miniupnpd: Makefile: move libnftnl, libmnl detection to configure

This commit is contained in:
Ivan Shapovalov 2024-09-03 13:35:04 +02:00 committed by Thomas Bernard
parent a1b4085de6
commit e9d63f63ef
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF
2 changed files with 5 additions and 13 deletions

View File

@ -65,19 +65,6 @@ ALLOBJS = $(BASEOBJS) $(LNXOBJS) $(NETFILTEROBJS) $(OTHEROBJS)
NFT_SCRIPTS = $(addprefix $(SRCDIR)/netfilter_nft/scripts/, \
nft_init.sh nft_removeall.sh nft_flush.sh nft_delete_chain.sh)
PCFILE_FOUND := $(shell $(PKG_CONFIG) --exists libnftnl; echo $$?)
ifeq (${PCFILE_FOUND},0)
PKG_CONFIG_LIBS = libnftnl libmnl
CFLAGS += $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_LIBS))
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l $(PKG_CONFIG_LIBS))
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L $(PKG_CONFIG_LIBS))
LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other $(PKG_CONFIG_LIBS))
else
endif # ifdef PCFILE_FOUND
#LDLIBS += -lnfnetlink
LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)

5
miniupnpd/configure vendored
View File

@ -682,6 +682,11 @@ case $FW in
MAKEFILE=Makefile.linux_nft
echo "#define USE_NETFILTER 1" >> ${CONFIGFILE}
echo "#define USE_NFTABLES 1" >> ${CONFIGFILE}
if pkg_detect libnftnl libmnl; then
:
else
echo "Warning: no libnftnl or libmnl pkg-config found"
fi
;;
*)
echo "Unknown Firewall/packet filtering software [$FW]"