diff options
author | Andrew Moss <1043609+amoss@users.noreply.github.com> | 2020-02-27 19:23:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-27 13:23:18 -0500 |
commit | 1ea0d8d0897ec2d84ff447874e2ebd6170f54287 (patch) | |
tree | 531e154ff5d1d01bcd5fadca9f7229da78161ea3 /configure.ac | |
parent | b7c793b872379a2fbb4f2ab7890a9b9c688219a8 (diff) |
Adding support for ACLK build-configuration (#8223)
* Fixes for issues not caught at review in #8144. (#8211)
* Properly scrub build environment for external dependencies.
* Remove LWS from our system-level dependencies.
We've decided to just always bundle it in the installer.
* Add missing dependency for Docker build process.
* Use static-build of LWS library created by installer (#8157)
* link static lib of LWS
* only use static LWS by installer
* handle -lcap
* fix problem on debian without lcap
* fix lws check
Co-authored-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
Co-authored-by: Timo <6674623+underhood@users.noreply.github.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 107 |
1 files changed, 56 insertions, 51 deletions
diff --git a/configure.ac b/configure.ac index 7dcb221962..cb41d69862 100644 --- a/configure.ac +++ b/configure.ac @@ -304,18 +304,6 @@ AC_CHECK_LIB( ) # ----------------------------------------------------------------------------- -# libwebsockets pure C library for implementing modern network protocols - -if test "${ACLK}" = "yes"; then - AC_CHECK_LIB( - [websockets], - [lws_set_timer_usecs], - [LWS_LIBS="-lwebsockets"] - ) -fi - - -# ----------------------------------------------------------------------------- # Judy General purpose dynamic array AC_CHECK_LIB( @@ -438,45 +426,6 @@ AC_MSG_RESULT([${enable_https}]) AM_CONDITIONAL([ENABLE_HTTPS], [test "${enable_https}" = "yes"]) # ----------------------------------------------------------------------------- -# ACLK - -#currenlty env var ACLK must be set to 'yes' to even consider building ACLK -if test "${ACLK}" = "yes"; then - AC_MSG_CHECKING([if libmosquitto static lib is present]) - if test -f "externaldeps/mosquitto/libmosquitto.a"; then - HAVE_libmosquitto_a="yes" - else - HAVE_libmosquitto_a="no" - fi - AC_MSG_RESULT([${HAVE_libmosquitto_a}]) - - AC_MSG_CHECKING([if netdata agent-cloud-link can be enabled]) - if test "${HAVE_libmosquitto_a}" = "yes" -a -n "${LWS_LIBS}"; then - can_enable_aclk="yes" - else - can_enable_aclk="no" - fi - AC_MSG_RESULT([${can_enable_aclk}]) - - test "${aclk_required}" = "yes" -a "${can_enable_aclk}" = "no" && \ - AC_MSG_ERROR([User required agent-cloud-link but it can't be built!]) - - AC_MSG_CHECKING([if netdata agent-cloud-link should/will be enabled]) - if test "${aclk_required}" = "detect"; then - enable_aclk=$can_enable_aclk - else - enable_aclk=$aclk_required - fi - - if test "${enable_aclk}" = "yes"; then - AC_DEFINE([ENABLE_ACLK], [1], [netdata ACLK]) - fi - - AC_MSG_RESULT([${enable_aclk}]) -fi -AM_CONDITIONAL([ENABLE_ACLK], [test "${enable_aclk}" = "yes"]) - -# ----------------------------------------------------------------------------- # Exporting engine AC_MSG_CHECKING([if netdata exporting engine should be used]) if test "${UV_LIBS}"; then @@ -591,6 +540,62 @@ fi AC_MSG_RESULT([${with_libcap}]) AM_CONDITIONAL([ENABLE_CAPABILITY], [test "${with_libcap}" = "yes"]) +# ----------------------------------------------------------------------------- +# ACLK + +#currently env var ACLK must be set to 'yes' to even consider building ACLK +if test "${ACLK}" = "yes"; then + AC_MSG_CHECKING([if libmosquitto static lib is present]) + if test -f "externaldeps/mosquitto/libmosquitto.a"; then + HAVE_libmosquitto_a="yes" + else + HAVE_libmosquitto_a="no" + fi + AC_MSG_RESULT([${HAVE_libmosquitto_a}]) + + AC_MSG_CHECKING([if libwebsockets static lib is present]) + if test -f "externaldeps/libwebsockets/libwebsockets.a"; then + LWS_LIBS="-I externaldeps/libwebsockets/include" + HAVE_libwebsockets_a="yes" + else + HAVE_libwebsockets_a="no" + fi + AC_MSG_RESULT([${HAVE_libwebsockets_a}]) + + if test "${build_target}" = "linux" -a "${aclk_required}" != "no"; then + if test "${have_libcap}" = "yes" -a "${with_libcap}" = "no"; then + AC_MSG_ERROR([agent-cloud-link can't be built without libcap. Disable it by --disable-aclk or enable libcap]) + fi + if test "${with_libcap}" = "yes"; then + LWS_LIBS+=" -lcap" + fi + fi + + AC_MSG_CHECKING([if netdata agent-cloud-link can be enabled]) + if test "${HAVE_libmosquitto_a}" = "yes" -a "${HAVE_libwebsockets_a}" = "yes"; then + can_enable_aclk="yes" + else + can_enable_aclk="no" + fi + AC_MSG_RESULT([${can_enable_aclk}]) + + test "${aclk_required}" = "yes" -a "${can_enable_aclk}" = "no" && \ + AC_MSG_ERROR([User required agent-cloud-link but it can't be built!]) + + AC_MSG_CHECKING([if netdata agent-cloud-link should/will be enabled]) + if test "${aclk_required}" = "detect"; then + enable_aclk=$can_enable_aclk + else + enable_aclk=$aclk_required + fi + + if test "${enable_aclk}" = "yes"; then + AC_DEFINE([ENABLE_ACLK], [1], [netdata ACLK]) + fi + + AC_MSG_RESULT([${enable_aclk}]) +fi +AM_CONDITIONAL([ENABLE_ACLK], [test "${enable_aclk}" = "yes"]) # ----------------------------------------------------------------------------- # apps.plugin |