From 4de312bce77d3548af6cc448a9f4e566126b4bab Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Sun, 16 Apr 2017 07:49:27 +0300 Subject: flowtop: take PKG_CONFIG into account for libnetfilter_conntrack Use $PKG_CONFIG to determine the linker flags for libnetfilter_conntrack. This fixes static link failure like the following: LD flowtop .../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open_nfnl': main.c:(.text+0x52): undefined reference to `nfnl_subsys_open' main.c:(.text+0x69): undefined reference to `nfnl_subsys_close' main.c:(.text+0x87): undefined reference to `nfnl_subsys_open' main.c:(.text+0xa3): undefined reference to `nfnl_subsys_close' .../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open': main.c:(.text+0xc9): undefined reference to `nfnl_open' main.c:(.text+0xf0): undefined reference to `nfnl_close' ... Signed-off-by: Baruch Siach Signed-off-by: Tobias Klauser --- flowtop/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flowtop/Makefile b/flowtop/Makefile index effe7eb..e001ce8 100644 --- a/flowtop/Makefile +++ b/flowtop/Makefile @@ -1,5 +1,5 @@ flowtop-libs = -lurcu \ - -lnetfilter_conntrack \ + $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnetfilter_conntrack 2> /dev/null ) \ $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncurses 2> /dev/null \ || echo '-lncurses') \ $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs tinfo 2> /dev/null ) \ -- cgit v1.2.3-54-g00ecf