From patchwork Fri Jun 30 23:00:12 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: 106778 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2883903qge; Fri, 30 Jun 2017 16:06:12 -0700 (PDT) X-Received: by 10.200.33.235 with SMTP id 40mr32110512qtz.189.1498863972256; Fri, 30 Jun 2017 16:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498863972; cv=none; d=google.com; s=arc-20160816; b=xNB6kp0Qu98uItiooIAK9gq/ehVg9Q4cygeqXRrpe0CRHToO3UWfJFPVKSzhGn4NS4 r/9o1VuEgMh3T9irnErxjbi0ce3pXRAvngyS1WmJhMe41SPVRq4ZChO0rrITL+x44IIF p77jhe5AMhcR4lVc9Jl5UyqFfY99c7viLmjsyNeIl9t8U93BOuAmZrLhvtGyYNetYvg6 lU8C/pN94uVZBrWV/oGbYcqePZYbc01fMv3xu3VnA4TMMCvG2tOWdIt8KSjerWX/cGE6 20379RdX40PaTnTobdhw9FGzMbY2HYZuSDn1JkIbYOO4tWnslimhXC1C9EhMdmck+P4D ah5Q== 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=fr7CIN3YpF6IIjoufkVI3+hQQrApkcaionM/omWXYkM=; b=IAUxPDBgpRCV5GifyLVPUHmmVE5HqO1BIwIHVzGdttqDov47eBXQVsxXnTmgb+QNhw a0EXMHD67o+KsjhUd2tKPkxBgjo//yyvZoGtnIh8LzWGqnlPAJ3tPFBWJdbZOsF2sbgp ZcVTJGNOY7QVbdrw+U4rmu3rPNntWbcP5Wipz1ABuW7Quzu7KiYqULGQioL8MqUajaAM 4GssS9upnrafdh1DQnEbR6UcHfvJNWR0odp7GrAQr87lm93LCnRomYzPryaJD3L/Yy3u D+DhtfheqNmuCPpQUc/coeNYy50uyShObLwNRL4NYN5o2zfMfsCYvZNYZwo979pzNSxP NAOg== 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 w20si2991195qtw.257.2017.06.30.16.06.11; Fri, 30 Jun 2017 16:06:12 -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 BA06260EC3; Fri, 30 Jun 2017 23:06:11 +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 F38BB622F0; Fri, 30 Jun 2017 23:01:40 +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 AC92860EC3; Fri, 30 Jun 2017 23:01:22 +0000 (UTC) Received: from forward5h.cmail.yandex.net (forward5h.cmail.yandex.net [87.250.230.20]) by lists.linaro.org (Postfix) with ESMTPS id 5844A60A01 for ; Fri, 30 Jun 2017 23:00:26 +0000 (UTC) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::28]) by forward5h.cmail.yandex.net (Yandex) with ESMTP id F391B20F25 for ; Sat, 1 Jul 2017 02:00:24 +0300 (MSK) Received: from smtp4o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp4o.mail.yandex.net (Yandex) with ESMTP id BA8596C01119 for ; Sat, 1 Jul 2017 02:00:24 +0300 (MSK) Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id jomLhvwstF-0N7qFSku; Sat, 01 Jul 2017 02:00:23 +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:12 +0300 Message-Id: <1498863614-26294-8-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 7/9] linux-gen: move timer_create check to platform directory 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 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 | 2 -- pkgconfig/libodp-linux.pc.in | 2 +- platform/linux-generic/Makefile.am | 1 + platform/linux-generic/m4/configure.m4 | 1 + platform/linux-generic/m4/odp_timer.m4 | 8 ++++++++ 5 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 platform/linux-generic/m4/odp_timer.m4 diff --git a/configure.ac b/configure.ac index 8e518a16..d3059ffb 100644 --- a/configure.ac +++ b/configure.ac @@ -363,8 +363,6 @@ AC_CONFIG_FILES([Makefile pkgconfig/libodphelper.pc ]) -AC_SEARCH_LIBS([timer_create],[rt posix4]) - ########################################################################## # distribute the changed variables among the Makefiles diff --git a/pkgconfig/libodp-linux.pc.in b/pkgconfig/libodp-linux.pc.in index 860c1cae..220dbc9c 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@ @PCAP_LIBS@ @PTHREAD_LIBS@ -lrt -lpthread @ATOMIC_LIBS@ +Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ @TIMER_LIBS@ -lpthread @ATOMIC_LIBS@ Cflags: -I${includedir} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index e81057e5..dff10980 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -261,6 +261,7 @@ __LIB__libodp_linux_la_LIBADD = $(ATOMIC_LIBS) __LIB__libodp_linux_la_LIBADD += $(OPENSSL_LIBS) __LIB__libodp_linux_la_LIBADD += $(DPDK_LIBS) $(DPDK_PMDS) __LIB__libodp_linux_la_LIBADD += $(PTHREAD_LIBS) +__LIB__libodp_linux_la_LIBADD += $(TIMER_LIBS) # Create symlink for ABI header files. Application does not need to use the arch # specific include path for installed files. diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index c8164b8c..8e008de4 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -75,6 +75,7 @@ fi AC_SUBST([ATOMIC_LIBS]) m4_include([platform/linux-generic/m4/odp_pthread.m4]) +m4_include([platform/linux-generic/m4/odp_timer.m4]) m4_include([platform/linux-generic/m4/odp_openssl.m4]) m4_include([platform/linux-generic/m4/odp_pcap.m4]) m4_include([platform/linux-generic/m4/odp_netmap.m4]) diff --git a/platform/linux-generic/m4/odp_timer.m4 b/platform/linux-generic/m4/odp_timer.m4 new file mode 100644 index 00000000..3122c92b --- /dev/null +++ b/platform/linux-generic/m4/odp_timer.m4 @@ -0,0 +1,8 @@ +########################################################################## +# Check for POSIX timer functions +########################################################################## + +AC_CHECK_LIB([rt], [timer_create], [TIMER_LIBS="-lrt"], + [AC_CHECK_LIB([posix4], [timer_create], [TIMER_LIBS="-lposix4"], + [AC_MSG_FAILURE([timer_create not found])])]) +AC_SUBST([TIMER_LIBS])