diff options
Diffstat (limited to '')
-rw-r--r-- | configure.ac | 52 |
1 files changed, 37 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index b42b007de..2f3cac5d4 100644 --- a/configure.ac +++ b/configure.ac @@ -249,6 +249,7 @@ AC_HEADER_RESOLV AC_CHECK_HEADERS_ONCE([sys/prctl.h]) AC_CHECK_HEADERS_ONCE([sys/vfs.h]) AC_CHECK_HEADERS_ONCE([sys/statfs.h]) +AC_CHECK_HEADERS_ONCE([linux/magic.h]) AC_CHECK_HEADERS_ONCE([sys/statvfs.h]) AC_CHECK_HEADERS_ONCE([sys/mount.h]) @@ -737,24 +738,43 @@ if test "$enable_cloud" = "no" -a "$aclk_ng" = "yes"; then fi if test "$enable_cloud" != "no" -a "$aclk_ng" != "no"; then + can_enable_ng="yes" + AC_MSG_CHECKING([if git submodules present for ACLK Next Generation]) + if test -f "mqtt_websockets/src/mqtt_wss_client.c"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + can_enable_ng="no" + fi + AC_MSG_CHECKING([if SSL available for ACLK Next Generation]) + if test -n "${SSL_LIBS}"; then + AC_MSG_RESULT([yes]) + OPTIONAL_SSL_CFLAGS="${SSL_CFLAGS}" + OPTIONAL_SSL_LIBS="${SSL_LIBS}" + else + AC_MSG_RESULT([no]) + fi AC_MSG_CHECKING([if JSON-C available for ACLK Next Generation]) if test "$enable_jsonc" != "yes"; then AC_MSG_RESULT([no]) + can_enable_ng="no" else AC_MSG_RESULT([yes]) - if test "$aclk_ng" != "yes" -a "$enable_aclk" == "no"; then #default "fallback" - AC_MSG_NOTICE([ACLK Legacy could not be built. Trying ACLK-NG as fallback.]) - aclk_ng="yes" - fi - if test "$aclk_ng" = "yes"; then - #TODO Check OpenSSL and JSON-C - AC_MSG_CHECKING([if ACLK Next Generation can be built]) - AC_DEFINE([ACLK_NG], [1], [ACLK Next Generation Should be used]) - AC_DEFINE([ENABLE_ACLK], [1], [netdata ACLK]) - enable_aclk="yes" - AC_MSG_RESULT([yes]) - OPTIONAL_MQTT_WSS_CFLAGS="-Imqtt_websockets/src/include" - fi + fi + AC_MSG_CHECKING([ACLK Next Generation can be built]) + AC_MSG_RESULT([${can_enable_ng}]) + if test "$aclk_ng" = "yes" -a "$can_enable_ng" != "yes"; then + AC_MSG_ERROR([ACLK-NG requested but can't be built]) + fi + if test "$aclk_ng" != "yes" -a "$enable_aclk" == "no" -a "$can_enable_ng" = "yes"; then #default "fallback" + AC_MSG_NOTICE([ACLK Legacy could not be built. Trying ACLK-NG as fallback.]) + aclk_ng="yes" + fi + if test "$aclk_ng" = "yes"; then + AC_DEFINE([ACLK_NG], [1], [ACLK Next Generation Should be used]) + AC_DEFINE([ENABLE_ACLK], [1], [netdata ACLK]) + enable_aclk="yes" + OPTIONAL_ACLK_NG_CFLAGS="-Imqtt_websockets/src/include -Imqtt_websockets/c-rbuf/include -Imqtt_websockets/MQTT-C/include" fi fi AC_SUBST([enable_cloud]) @@ -1457,7 +1477,7 @@ CFLAGS="${CFLAGS} ${OPTIONAL_MATH_CFLAGS} ${OPTIONAL_NFACCT_CFLAGS} ${OPTIONAL_Z ${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} ${OPTIONAL_JUDY_CFLAGS} \ - ${OPTIONAL_MQTT_WSS_CFLAGS}" + ${OPTIONAL_ACLK_NG_CFLAGS}" CXXFLAGS="${CFLAGS} ${CXX11FLAG}" @@ -1507,7 +1527,7 @@ AC_SUBST([OPTIONAL_PROMETHEUS_REMOTE_WRITE_LIBS]) AC_SUBST([OPTIONAL_MONGOC_CFLAGS]) AC_SUBST([OPTIONAL_MONGOC_LIBS]) AC_SUBST([OPTIONAL_LWS_LIBS]) -AC_SUBST([OPTIONAL_MQTT_WSS_CFLAGS]) +AC_SUBST([OPTIONAL_ACLK_NG_CFLAGS]) # ----------------------------------------------------------------------------- # Check if cmocka is available - needed for unit testing @@ -1561,6 +1581,7 @@ AC_CONFIG_FILES([ collectors/charts.d.plugin/Makefile collectors/checks.plugin/Makefile collectors/diskspace.plugin/Makefile + collectors/timex.plugin/Makefile collectors/fping.plugin/Makefile collectors/ioping.plugin/Makefile collectors/freebsd.plugin/Makefile @@ -1646,6 +1667,7 @@ AC_CONFIG_FILES([ web/api/queries/sum/Makefile web/api/health/Makefile web/gui/Makefile + web/gui/dashboard/Makefile web/server/Makefile web/server/static/Makefile claim/Makefile |