From patchwork Sat Jul 1 06:00:21 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: 106789 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp3157290qge; Fri, 30 Jun 2017 23:06:54 -0700 (PDT) X-Received: by 10.55.91.70 with SMTP id p67mr30745150qkb.237.1498889213979; Fri, 30 Jun 2017 23:06:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498889213; cv=none; d=google.com; s=arc-20160816; b=mMaZ2l6Bckg33xKQBA44BEFbkgh2PxXR1KUuf640ZZQovQouwiC8I0HMyX7I4gf4aT N5DN2b6l7KIJagZS0R+Y/9sz9hs6Pz6qE1EVwhHyOqK7AsuXtsOMjgiXWVlokwh5QHT/ A99y2oQM/XWMAP2GMVxCQMRfd/4KjbkcuLRpD1/mADkx+tj0gNhnRmqX1gUxR0TB1vp+ 4+32bTp9CE4GEy609oNO2GuHC77sVapKRy5o2hMux3adjHayzkiFN+BzCBcQ7WsrBKbf 7fbw8TxHLVRNw+GwDAodwLUqkame4esCGT4ZZg2FudCunhix7Q/Tdt0G1t7K+kyGOmbo MzSA== 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=DRldY8GNJc/0jlCpucoILqQ+lUA1jrS8eJdaS6bNjeQ=; b=TuAfiw9NZ7cOxb5iTOjzs+OzAwm43rHuqSs3BR7B3m1A19rBGsgLHWYUWbhMuOvVxR s7hgS8mejdPWfuU2A5SNTmPO2Vmrs2peqLpkF22YgE2v8MLKnbci+pK3rQ7n8YA5zANp wwNjiXtLXKAJg/Z3eM3N2CCE98hVjukPP2LFMgoNe5l8Xj/M1VthqL/RRN7i3vVXaVrc GKV6Z0n3PELf9Lfoa7F5a6ol1VJtqekg2nWE2u8T51Vw99fx1M9izowdx5gGNERi0ssP PD/SJqUCLH+J/SyfGkHtLvIgC4tK6SuDDgRMCWq82IKlJntDaOjgImTSBadJODYVjGqx QPug== 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 a68si9439022qkf.110.2017.06.30.23.06.53; Fri, 30 Jun 2017 23:06:53 -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 67D2A60CE8; Sat, 1 Jul 2017 06:06:53 +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 0E35762D06; Sat, 1 Jul 2017 06:01:18 +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 9431660CE8; Sat, 1 Jul 2017 06:01:10 +0000 (UTC) Received: from forward4h.cmail.yandex.net (forward4h.cmail.yandex.net [87.250.230.101]) by lists.linaro.org (Postfix) with ESMTPS id BB83D60CE4 for ; Sat, 1 Jul 2017 06:00:35 +0000 (UTC) Received: from smtp3m.mail.yandex.net (smtp3m.mail.yandex.net [IPv6:2a02:6b8:0:2519::125]) by forward4h.cmail.yandex.net (Yandex) with ESMTP id 481E720D96 for ; Sat, 1 Jul 2017 09:00:34 +0300 (MSK) Received: from smtp3m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3m.mail.yandex.net (Yandex) with ESMTP id 297212840CED for ; Sat, 1 Jul 2017 09:00:33 +0300 (MSK) Received: by smtp3m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id uZqkAfj1Oz-0XDK7KXG; Sat, 01 Jul 2017 09:00:33 +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:21 +0300 Message-Id: <1498888823-4065-8-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 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: eee6b6add9a03184bf2f3198f07e983bb88c0e0a **/ 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 4c23d136..efe5777e 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -260,6 +260,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) if HAVE_PCAP __LIB__libodp_linux_la_LIBADD += $(PCAP_LIBS) 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])