diff options
author | Alon Bar-Lev <alon.barlev@gmail.com> | 2015-11-16 13:29:06 +0200 |
---|---|---|
committer | Alon Bar-Lev <alon.barlev@gmail.com> | 2015-11-16 13:29:06 +0200 |
commit | 018b3b0c48b4bac8af72ca9492eab7f23579f0ba (patch) | |
tree | 7fb4fc67b0718f96dd9792ee9080a5a36b7e1b95 | |
parent | 90b01be9ffc2cfeab782831b0867aee55c1ccca2 (diff) |
build: do not attempt pkg detection unless required
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
-rw-r--r-- | configure.ac | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 9193b8a61d..4f35f1a8df 100644 --- a/configure.ac +++ b/configure.ac @@ -73,18 +73,6 @@ AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_C_INLINE -PKG_CHECK_MODULES( - [NFACCT], - [libnetfilter_acct], -) -PKG_CHECK_MODULES( - [LIBMNL], - [libmnl], -) -PKG_CHECK_MODULES( - [ZLIB], - [zlib], -) AC_ARG_VAR([MATH_CFLAGS], [C compiler flags for math]) AC_ARG_VAR([MATH_LIBS], [linker flags for math]) if test -z "${MATH_LIBS}"; then @@ -97,6 +85,14 @@ fi test "${enable_daemon}" = "yes" && AC_DEFINE([NETDATA_DAEMON], [1], [daemon settings]) if test "${enable_plugin_nfacct}" = "yes"; then + PKG_CHECK_MODULES( + [NFACCT], + [libnetfilter_acct], + ) + PKG_CHECK_MODULES( + [LIBMNL], + [libmnl], + ) test -z "${NFACCT_LIBS}" && AC_MSG_ERROR([netfilter_acct required but not found]) test -z "${LIBMNL_LIBS}" && AC_MSG_ERROR([libmnl required but not found]) AC_DEFINE([INTERNAL_PLUGIN_NFACCT], [1], [nfacct plugin settings]) @@ -104,6 +100,10 @@ if test "${enable_plugin_nfacct}" = "yes"; then OPTIONAL_NFACCT_LIBS="${NFACCT_LIBS} ${LIBMNL_LIBS}" fi if test "${with_zlib}" = "yes"; then + PKG_CHECK_MODULES( + [ZLIB], + [zlib], + ) test -z "${ZLIB_LIBS}" && AC_MSG_ERROR([zlib required but not found]) AC_DEFINE([NETDATA_WITH_ZLIB], [1], [zlib settings]) OPTIONAL_ZLIB_CLFAGS="${ZLIB_CFLAGS}" |