From 194ec61843b9598ce90873c812b817c4b96e2e0d Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Thu, 2 Sep 2021 12:56:00 +0300 Subject: Detect libpcap dependencies using pkg-config When building statically the link command line must include all dependencies of all libraries. libpcap can optionally depend on libnl. mausezahn can't build statically in this case. Use pkg-config in configure and in the link command to construct the library flags we need to link with libpcap. Signed-off-by: Baruch Siach Signed-off-by: Tobias Klauser --- mausezahn/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mausezahn/Makefile') diff --git a/mausezahn/Makefile b/mausezahn/Makefile index ca16b65..9544565 100644 --- a/mausezahn/Makefile +++ b/mausezahn/Makefile @@ -1,6 +1,6 @@ mausezahn-libs = -lcli \ -lnet \ - -lpcap \ + $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libpcap 2> /dev/null ) \ -lrt \ -lpthread \ -lm -- cgit v1.2.3-54-g00ecf