]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
iproute2: proper detection of libxtables position and flags
authorJan Engelhardt <jengelh@medozas.de>
Sat, 24 Sep 2011 21:37:34 +0000 (23:37 +0200)
committerStephen Hemminger <shemminger@vyatta.com>
Tue, 3 Jan 2012 23:05:25 +0000 (15:05 -0800)
Upstream: not sent yet

Any tests involving iptables _MUST_ utilize pkg-config to find the
proper locations of the installation.

configure
tc/Makefile

index f5c3d405727efefec595041ad6a8d8cb41f1209a..09a6987600fb2b8fa9749e146a6a3a67f4ad67a3 100755 (executable)
--- 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"
index a3d270db80e65c30b7b8ffa372d8dba2cff93c38..9cc1bf0f22ca95e7691badc0ffa9295882386b00 100644 (file)
@@ -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 $@ $<