From patchwork Fri Jun 30 23:00:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 106775 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2881843qge; Fri, 30 Jun 2017 16:03:37 -0700 (PDT) X-Received: by 10.237.47.132 with SMTP id m4mr30713716qtd.200.1498863817334; Fri, 30 Jun 2017 16:03:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498863817; cv=none; d=google.com; s=arc-20160816; b=vl1HiFKCcellzie68NoBtZsD+/vp94WTXK2q+979ujutA8tcF/muolwZmmK7rl67Vx cVFDyMvKVknKUJ8GjjrW5mESytTlbxTISYS8TDKTyWWbxxUM5P4zBZN80odOdU46kmZO yvpVFzc/L0yUvaAEIrAS0xtSovdnAGoaj+znQCDyAINDdPYbMeAP9hzf/rtcVzz5YHrc w8pZr9QNl1yfDlOymO6S9HTXg1KsfQRrTDPm/LhRiz6kyniYPXPNc8IPU6VP5espBqJW /Ukfy/fGnVX5aQcnWcPPcXaUcsPRDo9cFR3maXHEvXsLFTarnL1bbhSG4bC/HMgYjLqO fJyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=s+q8d9R83Elwfa8RTGsVDE1ae4sm1i1xnTCuO5mhsNU=; b=hyyESSqDT3FwF9HSgCnlOYuE/IBnA4Ws4prx+xg3TLfzPU3Td992RHaLyqUEHn6Spq 3VMox4pB3ihVWlTpMEwZzJMS9cTHCbpss3eNo0lXaSGxq4cuQKbDw0fC4Tlprx4FnJVW tY7X1kQ9p4PfyH00iwiAzV8g72DWaejoIPz8OStHdpHdH9Id+6T/omnQPEbh+OYsFyxC hEc1VyWYSf5ufWbiPSo34WVCQM69bUJjwsbHqa54aoN3RSFJdzXfaqo66MToSJrzm4v7 DGjpafc8xT8nQ1KVPc90EESFFUJbqlmRKqI07Iqnp4YXsonqgvHsWqaFATpsI6WDIWZe hBxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 43si8879581qtx.345.2017.06.30.16.03.37; Fri, 30 Jun 2017 16:03:37 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 0DC4460BFE; Fri, 30 Jun 2017 23:03:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED, URIBL_SBL, URIBL_SBL_A autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id D005562C6C; Fri, 30 Jun 2017 23:01:06 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 7239462CB2; Fri, 30 Jun 2017 23:00:59 +0000 (UTC) Received: from forward3p.cmail.yandex.net (forward3p.cmail.yandex.net [77.88.31.18]) by lists.linaro.org (Postfix) with ESMTPS id BEE3960BFE for ; Fri, 30 Jun 2017 23:00:23 +0000 (UTC) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::28]) by forward3p.cmail.yandex.net (Yandex) with ESMTP id A303B20C8A for ; Sat, 1 Jul 2017 02:00:21 +0300 (MSK) Received: from smtp4o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp4o.mail.yandex.net (Yandex) with ESMTP id 759E16C0110F for ; Sat, 1 Jul 2017 02:00:21 +0300 (MSK) Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jomLhvwstF-0K7q0Jdj; Sat, 01 Jul 2017 02:00:20 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) X-Yandex-Suid-Status: 1 0 From: Github ODP bot To: lng-odp@lists.linaro.org Date: Sat, 1 Jul 2017 02:00:09 +0300 Message-Id: <1498863614-26294-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1498863614-26294-1-git-send-email-odpbot@yandex.ru> References: <1498863614-26294-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v3 4/9] linux-gen: stop poisoning CFLAGS/LIBS with libpcap flags X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov Instead of poisoning global AM_CFLAGS/LIBS with libpcap flags, use fine-grained controls for compiling/linking with libpcap. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 45 (lumag:m4) ** https://github.com/Linaro/odp/pull/45 ** Patch: https://github.com/Linaro/odp/pull/45.patch ** Base sha: ceeab69f3af67701adb524c7b9757d19cefb1110 ** Merge commit sha: bc5ee5a9b895a630b180cd264a55c8e4817de750 **/ configure.ac | 1 - pkgconfig/libodp-linux.pc.in | 2 +- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/m4/odp_pcap.m4 | 8 ++++++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 3432b29a..8e518a16 100644 --- a/configure.ac +++ b/configure.ac @@ -210,7 +210,6 @@ AC_SUBST([testdir]) # Set conditionals as computed within platform specific files ########################################################################## AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ]) -AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes]) AM_CONDITIONAL([SDK_INSTALL_PATH_], [test "x${SDK_INSTALL_PATH_}" = "x1"]) AM_CONDITIONAL([test_installdir], [test "$testdir" != ""]) AM_CONDITIONAL([cunit_support], [test x$cunit_support = xyes ]) diff --git a/pkgconfig/libodp-linux.pc.in b/pkgconfig/libodp-linux.pc.in index 6dc06dc9..860c1cae 100644 --- a/pkgconfig/libodp-linux.pc.in +++ b/pkgconfig/libodp-linux.pc.in @@ -7,5 +7,5 @@ Name: libodp-linux Description: The ODP packet processing engine Version: @PKGCONFIG_VERSION@ Libs: -L${libdir} -lodp-linux @DPDK_LIBS@ -Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ -lpcap @PTHREAD_LIBS@ -lrt -lpthread @ATOMIC_LIBS@ +Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ -lrt -lpthread @ATOMIC_LIBS@ Cflags: -I${includedir} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 45bee7ea..3d9bba69 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -254,6 +254,7 @@ endif if HAVE_PCAP __LIB__libodp_linux_la_SOURCES += pktio/pcap.c +__LIB__libodp_linux_la_LIBADD += $(PCAP_LIBS) endif __LIB__libodp_linux_la_LIBADD = $(ATOMIC_LIBS) diff --git a/platform/linux-generic/m4/odp_pcap.m4 b/platform/linux-generic/m4/odp_pcap.m4 index 0439c60b..ffdff17c 100644 --- a/platform/linux-generic/m4/odp_pcap.m4 +++ b/platform/linux-generic/m4/odp_pcap.m4 @@ -9,6 +9,10 @@ AC_CHECK_HEADER(pcap/pcap.h, []) if test $have_pcap == yes; then - AM_CFLAGS="$AM_CFLAGS -DHAVE_PCAP" - LIBS="$LIBS -lpcap" + ODP_CFLAGS="$AM_CFLAGS -DHAVE_PCAP" + PCAP_LIBS="-lpcap" fi + +AC_SUBST([PCAP_LIBS]) + +AM_CONDITIONAL([HAVE_PCAP], [test $have_pcap = yes])