]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Use pkg-config to obtain xtables.h path
authorBenjamin Poirier <bpoirier@suse.de>
Wed, 6 Feb 2013 11:19:24 +0000 (11:19 +0000)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 11 Feb 2013 17:19:54 +0000 (09:19 -0800)
On openSUSE 12.2 (at least) xtables.h is not installed in the system-wide
include dir but in /usr/include/iptables-1.4.16.3/. This results in the
following build failure:
em_ipset.c:26:21: fatal error: xtables.h: No such file or directory

Other includers of xtables.h already call out to pkg-config

tc/Makefile

index 696f89132d4eaf6821e89fc34c1860abbf3d2dca..f26e76468457151546b6d3e523a3578500c69e6f 100644 (file)
@@ -140,6 +140,8 @@ m_xt.so: m_xt.c
 m_xt_old.so: m_xt_old.c
        $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt_old.so m_xt_old.c $$($(PKG_CONFIG) xtables --cflags --libs)
 
+em_ipset.o: CFLAGS += $$($(PKG_CONFIG) xtables --cflags)
+
 %.yacc.c: %.y
        $(YACC) $(YACCFLAGS) -o $@ $<