mirror of
https://github.com/status-im/miniupnp.git
synced 2025-02-04 02:23:24 +00:00
miniupnpd: Makefile: move libnftnl, libmnl detection to configure
This commit is contained in:
parent
a1b4085de6
commit
e9d63f63ef
@ -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
5
miniupnpd/configure
vendored
@ -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]"
|
||||
|
Loading…
x
Reference in New Issue
Block a user