summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:19:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-03-09 13:20:02 +0000
commit58daab21cd043e1dc37024a7f99b396788372918 (patch)
tree96771e43bb69f7c1c2b0b4f7374cb74d7866d0cb /configure.ac
parentReleasing debian version 1.43.2-1. (diff)
downloadnetdata-58daab21cd043e1dc37024a7f99b396788372918.tar.xz
netdata-58daab21cd043e1dc37024a7f99b396788372918.zip
Merging upstream version 1.44.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac274
1 files changed, 224 insertions, 50 deletions
diff --git a/configure.ac b/configure.ac
index 5db1b9f21..8f1e4115c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,6 +54,8 @@ else
AC_CHECK_TOOL([AR], [ar])
fi
+CFLAGS="$CFLAGS -fexceptions"
+
# -----------------------------------------------------------------------------
# configurable options
@@ -76,6 +78,18 @@ AC_ARG_ENABLE(
[enable_plugin_systemd_journal="detect"]
)
AC_ARG_ENABLE(
+ [logsmanagement],
+ [AS_HELP_STRING([--disable-logsmanagement], [Disable logsmanagement @<:@default autodetect@:>@])],
+ ,
+ [enable_logsmanagement="detect"]
+)
+AC_ARG_ENABLE(
+ [logsmanagement_tests],
+ [AS_HELP_STRING([--enable-logsmanagement-tests], [Enable logsmanagement tests @<:@default disabled@:>@])],
+ ,
+ [enable_logsmanagement_tests="no"]
+)
+AC_ARG_ENABLE(
[plugin-cups],
[AS_HELP_STRING([--enable-plugin-cups], [enable cups plugin @<:@default autodetect@:>@])],
,
@@ -208,6 +222,12 @@ AC_ARG_ENABLE(
[enable_ml="detect"]
)
AC_ARG_ENABLE(
+ [gtests],
+ [AS_HELP_STRING([--enable-gtests], [Enable google tests @<:@default no@:>@])],
+ ,
+ [enable_gtests="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"],
@@ -555,17 +575,92 @@ OPTIONAL_UV_LIBS="${UV_LIBS}"
AC_CHECK_LIB(
[lz4],
- [LZ4_initStream],
+ [LZ4_createStream],
[LZ4_LIBS_FAST="-llz4"]
)
AC_CHECK_LIB(
[lz4],
- [LZ4_compress_default],
+ [LZ4_compress_fast_continue],
[LZ4_LIBS="-llz4"]
)
# -----------------------------------------------------------------------------
+# libcurl
+
+PKG_CHECK_MODULES(
+ [LIBCURL],
+ [libcurl],
+ [AC_CHECK_LIB(
+ [curl],
+ [curl_easy_init],
+ [have_libcurl=yes],
+ [have_libcurl=no]
+ )],
+ [have_libcurl=no]
+)
+
+if test "x$have_libcurl" = "xyes"; then
+ AC_DEFINE([HAVE_CURL], [1], [libcurl usability])
+ OPTIONAL_CURL_LIBS="-lcurl"
+fi
+
+# -----------------------------------------------------------------------------
+# PCRE2
+
+PKG_CHECK_MODULES(
+ [LIBPCRE2],
+ [libpcre2-8],
+ [AC_CHECK_LIB(
+ [pcre2-8],
+ [pcre2_compile_8],
+ [have_libpcre2=yes],
+ [have_libpcre2=no]
+ )],
+ [have_libpcre2=no]
+)
+
+if test "x$have_libpcre2" = "xyes"; then
+ AC_DEFINE([HAVE_PCRE2], [1], [PCRE2 usability])
+ OPTIONAL_PCRE2_LIBS="-lpcre2-8"
+fi
+
+AM_CONDITIONAL([ENABLE_LOG2JOURNAL], [test "${have_libpcre2}" = "yes"])
+
+# -----------------------------------------------------------------------------
+# zstd
+
+AC_CHECK_LIB([zstd], [ZSTD_createCStream, ZSTD_createDStream],
+ [LIBZSTD_FOUND=yes],
+ [LIBZSTD_FOUND=no])
+
+if test "x$LIBZSTD_FOUND" = "xyes"; then
+ AC_DEFINE([ENABLE_ZSTD], [1], [libzstd usability])
+ OPTIONAL_ZSTD_LIBS="-lzstd"
+fi
+
+# -----------------------------------------------------------------------------
+# brotli
+
+AC_CHECK_LIB([brotlienc], [BrotliEncoderCreateInstance, BrotliEncoderCompressStream],
+ [LIBBROTLIENC_FOUND=yes],
+ [LIBBROTLIENC_FOUND=no])
+
+if test "x$LIBBROTLIENC_FOUND" = "xyes"; then
+ AC_DEFINE([ENABLE_BROTLIENC], [1], [libbrotlienc usability])
+ OPTIONAL_BROTLIENC_LIBS="-lbrotlienc"
+fi
+
+AC_CHECK_LIB([brotlidec], [BrotliDecoderCreateInstance, BrotliDecoderDecompressStream],
+ [LIBBROTLIDEC_FOUND=yes],
+ [LIBBROTLIDEC_FOUND=no])
+
+if test "x$LIBBROTLIDEC_FOUND" = "xyes"; then
+ AC_DEFINE([ENABLE_BROTLIDEC], [1], [libbrotlidec usability])
+ OPTIONAL_BROTLIDEC_LIBS="-lbrotlidec"
+fi
+
+# -----------------------------------------------------------------------------
# zlib
PKG_CHECK_MODULES(
@@ -653,7 +748,7 @@ AC_CHECK_SIZEOF(void *)
if test "$ac_cv_sizeof_void_p" = 8; then
AC_MSG_RESULT(Detected 64-bit Build Environment)
LIBJUDY_CFLAGS="$LIBJUDY_CFLAGS -DJU_64BIT"
-else
+else
AC_MSG_RESULT(Detected 32-bit Build Environment)
LIBJUDY_CFLAGS="$LIBJUDY_CFLAGS -UJU_64BIT"
fi
@@ -702,7 +797,7 @@ if test "${enable_lz4}" != "no"; then
AC_TRY_LINK(
[ #include <lz4.h> ],
[
- LZ4_stream_t* stream = LZ4_initStream(NULL, 0);
+ LZ4_stream_t* stream = LZ4_createStream();
],
[ enable_lz4="yes"],
[ enable_lz4="no" ]
@@ -770,6 +865,26 @@ AC_MSG_RESULT([${enable_jsonc}])
AM_CONDITIONAL([ENABLE_JSONC], [test "${enable_jsonc}" = "yes"])
# -----------------------------------------------------------------------------
+# libyaml
+
+PKG_CHECK_MODULES(
+ [LIBYAML],
+ [yaml-0.1],
+ [AC_CHECK_LIB(
+ [yaml],
+ [yaml_parser_initialize],
+ [have_libyaml=yes],
+ [have_libyaml=no]
+ )],
+ [have_libyaml=no]
+)
+
+if test "x$have_libyaml" = "xyes"; then
+ AC_DEFINE([HAVE_LIBYAML], [1], [libyaml usability])
+ OPTIONAL_YAML_LIBS="-lyaml"
+fi
+
+# -----------------------------------------------------------------------------
# YAML
if test -z "${YAML_LIBS}"; then
@@ -835,6 +950,27 @@ if test "${enable_pedantic}" = "yes"; then
CFLAGS="${CFLAGS} -pedantic -Wall -Wextra -Wno-long-long"
fi
+# -----------------------------------------------------------------------------
+# dlsym check
+
+AC_MSG_CHECKING(whether we can use dlsym)
+OLD_LIBS="${LIBS}"
+LIBS="-ldl"
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
+ #include <dlfcn.h>
+ static void *(*libc_malloc)(size_t);
+ int main() {
+ libc_malloc = dlsym(RTLD_NEXT, "malloc");
+ }
+]])], CAN_USE_DLSYM=yes, CAN_USE_DLSYM=no)
+LIBS="${OLD_LIBS}"
+AC_MSG_RESULT($CAN_USE_DLSYM)
+
+if test "x$CAN_USE_DLSYM" = xyes; then
+ AC_DEFINE([HAVE_DLSYM], [1], [dlsym usability])
+ OPTIONAL_DL_LIBS="-ldl"
+fi
+AC_SUBST([OPTIONAL_DL_LIBS])
# -----------------------------------------------------------------------------
# memory allocation library
@@ -903,9 +1039,6 @@ if test "${enable_h2o}" != "no"; then
else
can_build_h2o="no"
fi
- if test "${with_zlib}" != "yes"; then
- can_build_h2o="no"
- fi
AC_MSG_RESULT([${can_build_h2o}])
if test "${can_build_h2o}" = "no" -a "${enable_h2o}" = "yes"; then
@@ -1063,7 +1196,6 @@ fi
AC_MSG_RESULT([${enable_plugin_apps}])
AM_CONDITIONAL([ENABLE_PLUGIN_APPS], [test "${enable_plugin_apps}" = "yes"])
-
# -----------------------------------------------------------------------------
# freeipmi.plugin - libipmimonitoring
@@ -1151,6 +1283,19 @@ if test "${have_sd_journal_restart_fields}" = "yes"; then
AC_DEFINE([HAVE_SD_JOURNAL_RESTART_FIELDS], [1], [sd_journal_restart_fields usability])
fi
+AC_CHECK_LIB([systemd], [sd_journal_get_seqnum], [have_sd_journal_get_seqnum=yes], [have_sd_journal_get_seqnum=no])
+if test "${have_sd_journal_get_seqnum}" = "yes"; then
+ AC_DEFINE([HAVE_SD_JOURNAL_GET_SEQNUM], [1], [sd_journal_get_seqnum usability])
+fi
+
+AC_CHECK_LIB([systemd], [sd_bus_default_system, sd_bus_call_method, sd_bus_message_enter_container, sd_bus_message_read, sd_bus_message_exit_container],
+ [SYSTEMD_DBUS_FOUND=yes],
+ [SYSTEMD_DBUS_FOUND=no])
+
+if test "x$SYSTEMD_DBUS_FOUND" = "xyes"; then
+ AC_DEFINE([ENABLE_SYSTEMD_DBUS], [1], [libsystemd dbus usability])
+fi
+
AC_MSG_NOTICE([OPTIONAL_SYSTEMD_LIBS is set to: ${OPTIONAL_SYSTEMD_LIBS}])
if test "${enable_plugin_systemd_journal}" = "yes"; then
@@ -1394,17 +1539,17 @@ AM_CONDITIONAL([ENABLE_PLUGIN_PERF], [test "${enable_plugin_perf}" = "yes"])
# -----------------------------------------------------------------------------
# gtest/gmock
-AC_MSG_CHECKING([if gtest and gmock can be found])
+if test "${enable_gtests}" = "yes"; then
+ AC_MSG_CHECKING([if gtest can be found])
-PKG_CHECK_MODULES([GTEST], [gtest], [have_gtest=yes], [have_gtest=no])
-PKG_CHECK_MODULES([GMOCK], [gmock], [have_gmock=yes], [have_gmock=no])
+ PKG_CHECK_MODULES([GTEST], [gtest], [have_gtest=yes], [have_gtest=no])
-if test "${have_gtest}" = "yes" -a "${have_gmock}" = "yes"; then
- OPTIONAL_GTEST_CFLAGS="${GTEST_CFLAGS} ${GMOCK_CFLAGS}"
- OPTIONAL_GTEST_LIBS="${GTEST_LIBS} ${GMOCK_LIBS}"
- have_gtest="yes"
-else
- have_gtest="no"
+ if test "${have_gtest}" = "yes"; then
+ OPTIONAL_GTEST_CFLAGS="${GTEST_CFLAGS}"
+ OPTIONAL_GTEST_LIBS="${GTEST_LIBS}"
+
+ AC_DEFINE([HAVE_GTEST], [1], [gtest availability])
+ fi
fi
# -----------------------------------------------------------------------------
@@ -1450,6 +1595,56 @@ fi
# -----------------------------------------------------------------------------
+# logsmanagement
+
+LIBS_BAK="${LIBS}"
+
+# Check if submodules have not been fetched. Fail if Logs Management was explicitly requested.
+
+AC_MSG_CHECKING([if git submodules are present for logs management functionality])
+if test -f "fluent-bit/CMakeLists.txt"; then
+ AC_MSG_RESULT([yes])
+ have_logsmanagement_submodules="yes"
+else
+ AC_MSG_RESULT([no])
+ have_logsmanagement_submodules="no"
+fi
+
+if test "${enable_logsmanagement}" != "no" -a "${have_logsmanagement_submodules}" = "no"; then
+ AC_MSG_WARN([Logs management cannot be built because the required git submodules are missing.])
+fi
+
+if test "${enable_logsmanagement}" != "no" -a "x$CAN_USE_DLSYM" = xno; then
+ AC_MSG_WARN([Logs management cannot be built because dlsym cannot be used.])
+fi
+
+# Decide if we should build Logs Management
+if test "${enable_logsmanagement}" != "no" -a "${have_logsmanagement_submodules}" = "yes" -a "x$CAN_USE_DLSYM" = xyes; then
+ build_logsmanagement="yes"
+else
+ build_logsmanagement="no"
+fi
+
+AM_CONDITIONAL([ENABLE_LOGSMANAGEMENT], [test "${build_logsmanagement}" = "yes"])
+if test "${build_logsmanagement}" = "yes"; then
+ AC_DEFINE([ENABLE_LOGSMANAGEMENT], [1], [enable logs management functionality])
+fi
+
+# Decide if we should build Logs Management tests.
+if test "${build_logsmanagement}" = "yes" -a "${enable_logsmanagement_tests}" = "yes"; then
+ build_logsmanagement_tests="yes"
+else
+ build_logsmanagement_tests="no"
+fi
+
+AM_CONDITIONAL([ENABLE_LOGSMANAGEMENT_TESTS], [test "${build_logsmanagement_tests}" = "yes"])
+if test "${build_logsmanagement_tests}" = "yes"; then
+ AC_DEFINE([ENABLE_LOGSMANAGEMENT_TESTS], [1], [logs management tests])
+fi
+
+LIBS="${LIBS_BAK}"
+
+# -----------------------------------------------------------------------------
# debugfs.plugin
if test "${build_target}" = "linux"; then
@@ -1547,18 +1742,6 @@ PKG_CHECK_MODULES(
)
PKG_CHECK_MODULES(
- [LIBCURL],
- [libcurl],
- [AC_CHECK_LIB(
- [curl],
- [curl_easy_init],
- [have_libcurl=yes],
- [have_libcurl=no]
- )],
- [have_libcurl=no]
-)
-
-PKG_CHECK_MODULES(
[AWS_CPP_SDK_CORE],
[aws-cpp-sdk-core],
[have_libaws_cpp_sdk_core=yes],
@@ -1826,27 +2009,6 @@ AC_LANG_POP([C++])
# -----------------------------------------------------------------------------
-AC_MSG_CHECKING(whether we can use dlsym)
-OLD_LIBS="${LIBS}"
-LIBS="-ldl"
-AC_LINK_IFELSE([AC_LANG_SOURCE([[
- #include <dlfcn.h>
- static void *(*libc_malloc)(size_t);
- int main() {
- libc_malloc = dlsym(RTLD_NEXT, "malloc");
- }
-]])], CAN_USE_DLSYM=yes, CAN_USE_DLSYM=no)
-LIBS="${OLD_LIBS}"
-AC_MSG_RESULT($CAN_USE_DLSYM)
-
-if test "x$CAN_USE_DLSYM" = xyes; then
- AC_DEFINE([HAVE_DLSYM], [1], [dlsym usability])
- OPTIONAL_DL_LIBS="-ldl"
-fi
-AC_SUBST([OPTIONAL_DL_LIBS])
-
-# -----------------------------------------------------------------------------
-
AC_DEFINE_UNQUOTED([NETDATA_USER], ["${with_user}"], [use this user to drop privileged])
@@ -1900,6 +2062,12 @@ AC_SUBST([OPTIONAL_MATH_LIBS])
AC_SUBST([OPTIONAL_DATACHANNEL_LIBS])
AC_SUBST([OPTIONAL_UV_LIBS])
AC_SUBST([OPTIONAL_LZ4_LIBS])
+AC_SUBST([OPTIONAL_BROTLIENC_LIBS])
+AC_SUBST([OPTIONAL_BROTLIDEC_LIBS])
+AC_SUBST([OPTIONAL_YAML_LIBS])
+AC_SUBST([OPTIONAL_CURL_LIBS])
+AC_SUBST([OPTIONAL_PCRE2_LIBS])
+AC_SUBST([OPTIONAL_ZSTD_LIBS])
AC_SUBST([OPTIONAL_SSL_LIBS])
AC_SUBST([OPTIONAL_JSONC_LIBS])
AC_SUBST([OPTIONAL_YAML_LIBS])
@@ -1988,6 +2156,7 @@ AC_CONFIG_FILES([
collectors/freebsd.plugin/Makefile
collectors/freeipmi.plugin/Makefile
collectors/cups.plugin/Makefile
+ collectors/log2journal/Makefile
collectors/idlejitter.plugin/Makefile
collectors/macos.plugin/Makefile
collectors/nfacct.plugin/Makefile
@@ -2026,15 +2195,18 @@ AC_CONFIG_FILES([
libnetdata/aral/Makefile
libnetdata/avl/Makefile
libnetdata/buffer/Makefile
+ libnetdata/buffered_reader/Makefile
libnetdata/clocks/Makefile
libnetdata/completion/Makefile
libnetdata/config/Makefile
+ libnetdata/datetime/Makefile
libnetdata/dictionary/Makefile
libnetdata/ebpf/Makefile
libnetdata/eval/Makefile
libnetdata/facets/Makefile
libnetdata/functions_evloop/Makefile
libnetdata/july/Makefile
+ libnetdata/line_splitter/Makefile
libnetdata/locks/Makefile
libnetdata/log/Makefile
libnetdata/onewayalloc/Makefile
@@ -2048,6 +2220,7 @@ AC_CONFIG_FILES([
libnetdata/storage_number/tests/Makefile
libnetdata/threads/Makefile
libnetdata/url/Makefile
+ libnetdata/uuid/Makefile
libnetdata/json/Makefile
libnetdata/health/Makefile
libnetdata/worker_utilization/Makefile
@@ -2089,6 +2262,7 @@ AC_CONFIG_FILES([
web/server/static/Makefile
claim/Makefile
spawn/Makefile
+ logsmanagement/Makefile
])
AC_OUTPUT