Browse Source

use pkg-config to detect xtables library for iptables-extension

pull/909/head
Daniel-Constantin Mierla 6 years ago
parent
commit
5b0bee7086
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      iptables-extension/Makefile

+ 11
- 1
iptables-extension/Makefile View File

@ -11,7 +11,17 @@ else
endif
endif
XTABLES = $(shell test -e /usr/include/xtables.h && echo 1)
XTABLES_INSTALLED=$(shell \
if pkg-config --exists xtables; then \
echo 'xtables found'; \
fi)
ifneq ($(XTABLES_INSTALLED),)
XTABLES = 1
CFLAGS += $(shell pkg-config --cflags --libs xtables)
else
XTABLES = $(shell test -e /usr/include/xtables.h && echo 1)
endif
IPTABLES = $(shell test -e /usr/include/iptables.h && echo 1)
IP6TABLES = $(shell test -e /usr/include/ip6tables.h && echo 1)


Loading…
Cancel
Save