diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index 031351ab74..7bf0a9c7ba 100644 --- a/configure.ac +++ b/configure.ac @@ -738,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]) @@ -1458,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}" @@ -1508,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 |