From patchwork Sat Jul 1 06:00:18 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: 106785 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp3154166qge; Fri, 30 Jun 2017 23:02:26 -0700 (PDT) X-Received: by 10.200.55.44 with SMTP id o41mr30494136qtb.120.1498888945904; Fri, 30 Jun 2017 23:02:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498888945; cv=none; d=google.com; s=arc-20160816; b=zmxpimmNVCDjKbn2RGBX7K4CggIWQ8Pq+Q8zxbdCBYTD+6zTqoVw1hQZEqGDS7R1nC bZ/m4KTVSNc9+xUG4uIgk69c98bC+hmtUDl2k7zCVrv3eDLZyH7+nl45zSmEyETprAHc y8PTAExVUsBUhIL01aJ6DMkswG/soTGWJEgEDHd9tz/2t/9hmqEeKGEX7mFpOwNQksvx zQUHHfNCjtAA47coV25C87IiiHVDOAa8Hn1totF5EfQq7+Ag/B9v7S3DaTbfm0RaTEyZ wV6gGeGMvYEfTss7Vdm99l1Hckp+2wobyIROM27qLytgr/g8c6EBaMLJv21GadRJiKG2 sxkA== 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=t3J6e6+LUQ4Rt592NctpYD/uuxirThuOtsdTseJdLhA=; b=HEqGKicLNvYvtq68X5GbLDED5z7GaTzvlyaLXelsVjOuVoIfiy+o8M2c2wQ5xe31rn 4/WFC1WX8uJJ5rGjYD8By0MAnORMzXJP9SzCG9VXO6itqXkzMyjjvUEfRMIYPYlTdswJ eaeeQAUzHLmzThM8ioGjIQpMQcQ4NMUr8kR8vXNHfCm0Ts2Z303z92NR4UW4kNXpRQTm uzUCE7mtbHa750o6bW05eGpxTXv3qE2nOhgjULS5glPzykfqAfqFFSuv5hwp7iyRAxN5 Hsd7n2/Ke5FX075DatLVsG2jnF3+2eqHYHTxwdUTW1wl3utjNksdb54nl39Tf9HCDb7A vLow== 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 75si9866150qky.127.2017.06.30.23.02.25; Fri, 30 Jun 2017 23:02:25 -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 9357762C62; Sat, 1 Jul 2017 06:02:25 +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, 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 52AB362C6C; Sat, 1 Jul 2017 06:00:44 +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 60E4560669; Sat, 1 Jul 2017 06:00:36 +0000 (UTC) Received: from forward2m.cmail.yandex.net (forward2m.cmail.yandex.net [5.255.216.20]) by lists.linaro.org (Postfix) with ESMTPS id 16BA960669 for ; Sat, 1 Jul 2017 06:00:32 +0000 (UTC) Received: from smtp3m.mail.yandex.net (smtp3m.mail.yandex.net [IPv6:2a02:6b8:0:2519::125]) by forward2m.cmail.yandex.net (Yandex) with ESMTP id AD97320E43 for ; Sat, 1 Jul 2017 09:00:30 +0300 (MSK) Received: from smtp3m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3m.mail.yandex.net (Yandex) with ESMTP id 7049E2840F57 for ; Sat, 1 Jul 2017 09:00:30 +0300 (MSK) Received: by smtp3m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id uZqkAfj1Oz-0TDSiUO3; Sat, 01 Jul 2017 09:00:29 +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 09:00:18 +0300 Message-Id: <1498888823-4065-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1498888823-4065-1-git-send-email-odpbot@yandex.ru> References: <1498888823-4065-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v4 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: eee6b6add9a03184bf2f3198f07e983bb88c0e0a **/ configure.ac | 1 - pkgconfig/libodp-linux.pc.in | 2 +- platform/linux-generic/Makefile.am | 4 ++++ platform/linux-generic/m4/odp_pcap.m4 | 8 ++++++-- 4 files changed, 11 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..a59d424f 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -260,6 +260,10 @@ __LIB__libodp_linux_la_LIBADD = $(ATOMIC_LIBS) __LIB__libodp_linux_la_LIBADD += $(OPENSSL_LIBS) __LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS) +if HAVE_PCAP +__LIB__libodp_linux_la_LIBADD += $(PCAP_LIBS) +endif + # Create symlink for ABI header files. Application does not need to use the arch # specific include path for installed files. install-data-hook: 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])