From d7aa57d450b2b651e9115d5d9ad6bf0f433798da Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 24 Sep 2011 23:37:34 +0200 Subject: [PATCH] iproute2: proper detection of libxtables position and flags Upstream: not sent yet Any tests involving iptables _MUST_ utilize pkg-config to find the proper locations of the installation. --- configure | 2 +- tc/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index f5c3d4057..09a698760 100755 --- a/configure +++ b/configure @@ -47,7 +47,7 @@ int main(int argc, char **argv) EOF -if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1 +if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl >/dev/null 2>&1 then echo "TC_CONFIG_XT:=y" >>Config echo "using xtables" diff --git a/tc/Makefile b/tc/Makefile index a3d270db8..9cc1bf0f2 100644 --- a/tc/Makefile +++ b/tc/Makefile @@ -126,10 +126,10 @@ q_atm.so: q_atm.c $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm m_xt.so: m_xt.c - $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt.so m_xt.c -lxtables + $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt.so m_xt.c $$(pkg-config xtables --cflags --libs) m_xt_old.so: m_xt_old.c - $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt_old.so m_xt_old.c -lxtables + $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt_old.so m_xt_old.c $$(pkg-config xtables --cflags --libs) %.yacc.c: %.y $(YACC) $(YACCFLAGS) -o $@ $< -- 2.47.3