diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-09-16 07:03:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 07:03:27 -0400 |
commit | 5f3a7224abe61ed0105d3d681b3d2b82aa61e2eb (patch) | |
tree | dc11b4306870c01e2824c173a69f5473585552c9 /configure.ac | |
parent | a1b997f7bcc5dc8de93473abc27d413035c2d47e (diff) |
Added a way to get build configuration info from the agent. (#9913)
* Add a way to get build configuration info from the agent.
This adds a new option to the `-W` switch called 'buildinfo'. When
invoked with this argument, Netdata will print it's version, the
configure options, and a list of optional features and whether they are
enabled or not.
This is intended to serve three purposes:
* It allows developers to more quickly get an idea of how Netdata was
built when triaging bug reports.
* It provides an easier way to validate changes to the build system that
affect optional features during the development cycle.
* It provides an easier way to build CI workflows that validate that
building under a given set of constraints results in a feature being
enabled or not.
The actual implementation is a bit large but overall exceedingly simple,
consisting of a set of preprocessor directives to extract optional
feature state information from config.h and then a series of printf()
calls to actually report this info (which should end up optimized by
smart compilers due to all the arguments being compile-time constants).
* Added zlib to optional libraries.
* Added remaining optional plugins to buildinfo output.
* Changed formatting to be more human friendly.
* Add remaining optional libraries.
* Fix up formatting to be even more human friendly.
* Fix typo in buildinfo output.
* Remove unused variable.
* Fixed spelling of config.h option name.
* Update daemon/buildinfo.c
Co-authored-by: Markos Fountoulakis <44345837+mfundul@users.noreply.github.com>
* Fix option name mismatch for libcrypto.
* Update daemon/buildinfo.c
Co-authored-by: Markos Fountoulakis <44345837+mfundul@users.noreply.github.com>
Co-authored-by: Markos Fountoulakis <44345837+mfundul@users.noreply.github.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 800664de47..f9379a9bfa 100644 --- a/configure.ac +++ b/configure.ac @@ -43,7 +43,6 @@ AC_PROG_INSTALL PKG_PROG_PKG_CONFIG AC_USE_SYSTEM_EXTENSIONS - # ----------------------------------------------------------------------------- # configurable options @@ -329,7 +328,6 @@ AC_CHECK_LIB( ) - # ----------------------------------------------------------------------------- # zlib @@ -382,6 +380,9 @@ AC_CHECK_LIB( [ssl_host_validation="no"] ) +test -z "${SSL_LIBS}" || \ + AC_DEFINE([HAVE_CRYPTO], [1], [libcrypto availability]) + if test "${ssl_host_validation}" = "no"; then AC_DEFINE([HAVE_X509_VERIFY_PARAM_set1_host], [0], [ssl host validation]) AC_MSG_WARN([DISABLING SSL HOSTNAME VALIDATION BECAUSE IT IS NOT AVAILABLE ON THIS SYSTEM.]) @@ -705,6 +706,7 @@ AM_CONDITIONAL([ENABLE_ACLK], [test "${enable_aclk}" = "yes"]) AC_MSG_CHECKING([if apps.plugin should be enabled]) if test "${build_target}" != "macos"; then + AC_DEFINE([ENABLE_APPS_PLUGIN], [1], [apps.plugin]) enable_plugin_apps="yes" else enable_plugin_apps="no" @@ -972,6 +974,7 @@ AC_CHECK_HEADER( AC_MSG_CHECKING([if perf.plugin should be enabled]) if test "${build_target}" == "linux" -a "${have_perf_event}" = "yes"; then + AC_DEFINE([ENABLE_PERF_PLUGIN], [1], [perf.plugin]) enable_plugin_perf="yes" else enable_plugin_perf="no" @@ -1023,6 +1026,7 @@ AM_CONDITIONAL([ENABLE_PLUGIN_EBPF], [test "${enable_ebpf}" = "yes"]) AC_MSG_CHECKING([if slabinfo.plugin should be enabled]) if test "${build_target}" == "linux"; then + AC_DEFINE([ENABLE_SLABINFO], [1], [slabinfo plugin]) enable_plugin_slabinfo="yes" else enable_plugin_slabinfo="no" @@ -1459,6 +1463,14 @@ TEST_LIBS="${CMOCKA_LIBS}" AC_SUBST([TEST_CFLAGS]) AC_SUBST([TEST_LIBS]) +# ----------------------------------------------------------------------------- +# save configure options for build info +AC_DEFINE_UNQUOTED( + [CONFIGURE_COMMAND], + ["$ac_configure_args"], + [options passed to configure script] +) + AC_CONFIG_FILES([ Makefile netdata.spec |