From: Benjamin Poirier Date: Wed, 6 Feb 2013 11:19:24 +0000 (+0000) Subject: Use pkg-config to obtain xtables.h path X-Git-Tag: v3.8.0~3^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ab3a4de5ec5d6451ad17b781ff25dfa1932587f;p=thirdparty%2Fiproute2.git Use pkg-config to obtain xtables.h path 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 --- diff --git a/tc/Makefile b/tc/Makefile index 696f89132..f26e76468 100644 --- a/tc/Makefile +++ b/tc/Makefile @@ -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 $@ $<