From patchwork Tue Jun 13 22:00:02 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: 105433 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp10914qgd; Tue, 13 Jun 2017 15:02:09 -0700 (PDT) X-Received: by 10.200.36.15 with SMTP id c15mr3166095qtc.124.1497391329852; Tue, 13 Jun 2017 15:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497391329; cv=none; d=google.com; s=arc-20160816; b=HwyZgXqVtIY7cN1AgnuUw/XISJCvwH7Ony4SkTyp7PnzUPMmd2Lku8ayLsa3RnQCHH PNgz2Ju+Z0sarKMx7P0nsDZz86WKO7A8kcd0Vow4jJLFHZBIHpLXWVTKkxIHFbhrd6ko FXO0UdL4oA2NKGc5ZnjhyFBPSwz4fq5IjXsbE53fLzpIhIRcveI5PIpbkHG/Jdh30Edc U0OX3cNUQ7U454KozOF2YB6t6kb+WZZfnERo679YoEuE3kz9iGkhphA0pBWsCw4vjNo7 H6aIDVM+6CIlXjLNBcC3jrKraiOs++oTjgyg2kBLZlN/yUCHxxQV6+AZZs8O1j3LN6+a mn3w== 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=bMAvXZgSdeo7HCxuNVpJDM4yGSzw64J5Aq1n1TVGuxU=; b=EVP0h49jgiC959nuIkT/V7qmOhNcMp2HMgtYaxjNG/4n2rmBuaPbY3KiVnGDWmPxDZ cGbVYyNFyXSyxIPQJwgdl7fX3mKwKMGZaXbmQFcMEsgwORHXD19M5Hq2lAijwsXz/K7/ YWcvDOF4LRQsT4yHVhg0PeHBUMYEHfBL13T07v12AbrqH9jU6t3aEap1f9fUUk0SaxMl OK0v4xd+9IzO8A4xjSBJv1qWrFGJnIkRAAHKa74ieIGXBhDBuoGzeY6cNCCxiIwPl7wH 771oLqneV5/jTeh9iWTjU4KoVSKEBb8+AEohTNdrUOkADZRdTbAds7+D2bV35t6Mrsub Y4Og== 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 m57si1335658qtf.250.2017.06.13.15.02.09; Tue, 13 Jun 2017 15:02:09 -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 8BDF060BF3; Tue, 13 Jun 2017 22:02:09 +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 0E11C60BF6; Tue, 13 Jun 2017 22:00:31 +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 6227260BF1; Tue, 13 Jun 2017 22:00:20 +0000 (UTC) Received: from forward1h.cmail.yandex.net (forward1h.cmail.yandex.net [87.250.230.16]) by lists.linaro.org (Postfix) with ESMTPS id 5BE04609D2 for ; Tue, 13 Jun 2017 22:00:16 +0000 (UTC) Received: from smtp3m.mail.yandex.net (smtp3m.mail.yandex.net [77.88.61.130]) by forward1h.cmail.yandex.net (Yandex) with ESMTP id C1CFA2105E for ; Wed, 14 Jun 2017 01:00:14 +0300 (MSK) Received: from smtp3m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3m.mail.yandex.net (Yandex) with ESMTP id A39AB2840EC6 for ; Wed, 14 Jun 2017 01:00:14 +0300 (MSK) Received: by smtp3m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id bQG4KXwTEl-0DC084he; Wed, 14 Jun 2017 01:00:13 +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: Wed, 14 Jun 2017 01:00:02 +0300 Message-Id: <1497391207-13288-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1497391207-13288-1-git-send-email-odpbot@yandex.ru> References: <1497391207-13288-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v2 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: 7cf390d11e69f6b677e6fbfd6414944737406fc3 ** Merge commit sha: 3808f2b5af9d034f6157eb2c7eec543ee8055fbf **/ 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 7410eda6..883cd337 100644 --- a/configure.ac +++ b/configure.ac @@ -209,7 +209,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 8073f078..33d36243 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -228,6 +228,7 @@ __LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS) if HAVE_PCAP __LIB__libodp_linux_la_SOURCES += pktio/pcap.c +__LIB__libodp_linux_la_LIBADD += $(PCAP_LIBS) endif # Create symlink for ABI header files. Application does not need to use the arch 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])