From patchwork Fri Jun 2 14: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: 101270 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp413669qge; Fri, 2 Jun 2017 07:05:45 -0700 (PDT) X-Received: by 10.55.192.157 with SMTP id v29mr8650541qkv.240.1496412344863; Fri, 02 Jun 2017 07:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412344; cv=none; d=google.com; s=arc-20160816; b=gQ3kEQw+ZiiOU28ycRV3WkcIohcPofJFunV+KocCW3LNzcQPBjhWdec25voyjkJR8G ms+j/DJbZJEqwZGQEDSAU5Trkz6owmHg7SnZrYbkvSRpa3U37ChzJDPM7Pibyi460rmY l8gpe3qcmmZa8fy6MCADcxYcyIwTB87qYe6VO6C25Nh3wM8oRSGaRyD7IitY/BQ6Pg5O fCPvlPT/ehhXgECRRfniBNTW2ZTyOIy4cGXPZZzCltvbzfNwEU5Ng2Fm931uGa5h5ara edAVsJGcx8xAPv8SJWhkR0yVr4gphYygSels60Gt1/kI36H3YhJN+fnDq/nmH/3my9eE KcqA== 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=I6LCYW6N8jESz8sDyOfxRp0/dKoCHK4xJV/IA41XIYo=; b=D5pPfJXSUu45bnpr44SOGI9oKD9yURFuVf6DhLc7eGLTZ7VwwRTwHswAmZHaSRCmX5 ptk8KU2ysKUNz1DJ/KY54ym2NIIY8KjJ2BsfvRQSMNYEC5aXpGb+unWp36BCpJfV6M8C /9lX+lBDSmwd0BoPgq+uVdqelzy6RXSlvC8jbj1h5LPUoRbYJq10Gs4JjwxbWlM38XnB 7NeBwbszkaEAsfzpT1ElLTe7qt/fJy7cFagFF/y0vZNJ6d70POn5x8gGOqHwNGTbLIfT ayc3Aqz6jP8x8IzoCCd7/eHt9HjXNx75dmCbIhcJcalNEaGD/Yu22jK9cmU0v7e2QVEZ 1nww== 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 q54si22795845qte.159.2017.06.02.07.05.44; Fri, 02 Jun 2017 07:05:44 -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 70BD160EC0; Fri, 2 Jun 2017 14:05:44 +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 F15FF60E2C; Fri, 2 Jun 2017 14:01: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 1C8D96067C; Fri, 2 Jun 2017 14:01:07 +0000 (UTC) Received: from forward5j.cmail.yandex.net (forward5j.cmail.yandex.net [5.255.227.23]) by lists.linaro.org (Postfix) with ESMTPS id ECC8260E6A for ; Fri, 2 Jun 2017 14:00:19 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::26]) by forward5j.cmail.yandex.net (Yandex) with ESMTP id 9B4CD20F6F for ; Fri, 2 Jun 2017 17:00:18 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id 0E82C5080F66 for ; Fri, 2 Jun 2017 17:00:15 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0Foic2V0; Fri, 02 Jun 2017 17:00:15 +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: Fri, 2 Jun 2017 17:00:02 +0300 Message-Id: <1496412007-23455-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> References: <1496412007-23455-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 45 Subject: [lng-odp] [PATCH v1 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: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ 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 437a978e..d0766f6c 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 5b6e9c28..172e8d09 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 +Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ -lrt -lpthread Cflags: -I${includedir} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 7f2e341d..14fdf35e 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -227,6 +227,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])