From patchwork Tue Jun 13 22:00:05 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: 105437 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp12559qgd; Tue, 13 Jun 2017 15:06:23 -0700 (PDT) X-Received: by 10.55.71.212 with SMTP id u203mr2839668qka.248.1497391583357; Tue, 13 Jun 2017 15:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497391583; cv=none; d=google.com; s=arc-20160816; b=rBNZsKmHXdXqbE5DOBvN7tnYXDyLrLpwPaqNkiiZvhpWF9MQD2nHR9roBf6VohBRSh YDJ7PADT1WZbvYO6A3gN0OAsbJuvaH9hUetN0bO8CV+PSgGNTtMWcmrhlsJmDs2Hy9Da TbfhPfUORyfHT+azvOZ7yc4LoCiEDCU0gze3uzkyQ3NxcPWLWOZAkaBlXK8Pp8HQrfAb lfxicHctkNVZdZfJT7cfdUIPa12jMCXuw3/v1pfcC3jjLfWSfGgEfi1L/PujCI1hPOIm 29WC2semkf6Rlc1Hml5bWG17ndFNAfCBRsP1q16A/tTVXmEZ5W6Dtl6qnpsXPsePCPTM 6llQ== 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=FsXPtcJ7Fp+VozH1JL7ko/sa7C6va5SAj3cZ+1KgdQE=; b=LKdLcaFDzSiCpShoQwXYdKpufuQiVZl9ejjT98W/9xs0O3IwbWK7iiMB6ZOSNsPHPV RHZgIVtfr50v0Vtakd7GQi3o9R8IVEUtn57LQ4nZbYpO0/rGDHn8CsA81+ZsppKE3iqP SbEqb3XXcyF/ja6ZFh81nhBo4VYwfhFhsOHkN/cGTTeIoo954sPeb8pX//Qd0Cr01BkI v2/rhJxpvXpEzniiZPVXHIo27twQIByF3nAjsgwKySB1jfNDCwgvtmMep4UMl7BhYnre mQfvAi3yYUu2zvwLYeTuRBehS3JAQNH9QwLQbto5msmpWXyfNWHJXSPwD7z9oFAnf0l+ xU5A== 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 k29si1352285qtf.145.2017.06.13.15.06.23; Tue, 13 Jun 2017 15:06:23 -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 164CF6064C; Tue, 13 Jun 2017 22:06:23 +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, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 97CB260A4A; Tue, 13 Jun 2017 22:01:00 +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 55A7660BFE; Tue, 13 Jun 2017 22:00:53 +0000 (UTC) Received: from forward4p.cmail.yandex.net (forward4p.cmail.yandex.net [77.88.31.19]) by lists.linaro.org (Postfix) with ESMTPS id 982B4609A2 for ; Tue, 13 Jun 2017 22:00:20 +0000 (UTC) Received: from smtp3m.mail.yandex.net (smtp3m.mail.yandex.net [IPv6:2a02:6b8:0:2519::125]) by forward4p.cmail.yandex.net (Yandex) with ESMTP id 8568020B63 for ; Wed, 14 Jun 2017 01:00:18 +0300 (MSK) Received: from smtp3m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp3m.mail.yandex.net (Yandex) with ESMTP id 602D82840F30 for ; Wed, 14 Jun 2017 01:00:17 +0300 (MSK) Received: by smtp3m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id bQG4KXwTEl-0HCCiYLg; Wed, 14 Jun 2017 01:00:17 +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:05 +0300 Message-Id: <1497391207-13288-8-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 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: 7cf390d11e69f6b677e6fbfd6414944737406fc3 ** Merge commit sha: 3808f2b5af9d034f6157eb2c7eec543ee8055fbf **/ 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 883cd337..cf824d3c 100644 --- a/configure.ac +++ b/configure.ac @@ -345,8 +345,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 d421931d..7928f54a 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -226,6 +226,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_SOURCES += pktio/pcap.c diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4 index 6a429f1d..34f36d92 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -74,6 +74,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])