summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com>2023-03-01 15:03:51 +0200
committerGitHub <noreply@github.com>2023-03-01 15:03:51 +0200
commit513452aa447759acecb16504673db7dce40ffaa2 (patch)
tree85164f59dd18431f2b12b0aafe304a0a56e42c5c /configure.ac
parent4c20aca875a0784ff807c980a8fae2f7fb7d51a0 (diff)
Link statically libnetfilter_acct into our static builds (#14516)
Bundle the nfacct dependencies libnetfilter_acct as static lib from source archives and libmnl as static lib from the alpines' packages (regular package manager) into our Netdata static binaries Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud> Co-authored-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 20 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index c87dd6fef9..e0b2ec0e0d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -952,17 +952,8 @@ AC_CHECK_HEADER(
[have_nfnetlink_conntrack=no]
)
-PKG_CHECK_MODULES(
- [NFACCT],
- [libnetfilter_acct],
- [AC_CHECK_LIB(
- [netfilter_acct],
- [nfacct_alloc],
- [have_libnetfilter_acct=yes],
- [have_libnetfilter_acct=no]
- )],
- [have_libnetfilter_acct=no]
-)
+LIBS_BAK="${LIBS}"
+LIBS="${LIBS} -lmnl"
PKG_CHECK_MODULES(
[LIBMNL],
@@ -976,6 +967,24 @@ PKG_CHECK_MODULES(
[have_libmnl=no]
)
+
+LIBS="${LIBS}"
+
+PKG_CHECK_MODULES(
+ [NFACCT],
+ [libnetfilter_acct],
+ AC_SEARCH_LIBS(
+ [nfacct_alloc],
+ [netfilter_acct libnetfilter_acct],
+ [have_libnetfilter_acct=yes],
+ [have_libnetfilter_acct=no],
+ [${LIBS} -L/libnetfilter-acct-static/lib/libnetfilter_acct.a]
+ )],
+ [have_libnetfilter_acct=no]
+)
+
+LIBS="${LIBS_BAK}"
+
test "${enable_plugin_nfacct}" = "yes" -a "${have_nfnetlink_conntrack}" != "yes" && \
AC_MSG_ERROR([nfnetlink_conntrack.h required but not found or too old])