From patchwork Sat Dec 31 22:17:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Engelhardt X-Patchwork-Id: 133748 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BDF4FB6FB4 for ; Sun, 1 Jan 2012 09:18:03 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753360Ab1LaWR7 (ORCPT ); Sat, 31 Dec 2011 17:17:59 -0500 Received: from seven.medozas.de ([188.40.89.202]:50002 "EHLO seven.medozas.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753251Ab1LaWR6 (ORCPT ); Sat, 31 Dec 2011 17:17:58 -0500 Received: by seven.medozas.de (Postfix, from userid 25121) id 3FDF321A0173; Sat, 31 Dec 2011 23:17:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by seven.medozas.de (Postfix) with ESMTP id 16E2421A0172; Sat, 31 Dec 2011 23:17:56 +0100 (CET) Date: Sat, 31 Dec 2011 23:17:56 +0100 (CET) From: Jan Engelhardt To: shemminger@vyatta.com cc: Linux Networking Developer Mailing List Subject: iproute2: proper detection of libxtables position and flags Message-ID: User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jan Engelhardt Date: 2011-09-24 23:37:34.405739159 +0200 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(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: iproute2-2.6.39/configure =================================================================== --- iproute2-2.6.39.orig/configure +++ iproute2-2.6.39/configure @@ -49,7 +49,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: iproute2-2.6.39/tc/Makefile =================================================================== --- iproute2-2.6.39.orig/tc/Makefile +++ iproute2-2.6.39/tc/Makefile @@ -124,10 +124,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 $@ $<