From patchwork Fri Jun 2 14: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: 101267 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp412054qge; Fri, 2 Jun 2017 07:03:03 -0700 (PDT) X-Received: by 10.200.55.98 with SMTP id p31mr8166000qtb.64.1496412183869; Fri, 02 Jun 2017 07:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496412183; cv=none; d=google.com; s=arc-20160816; b=XY+K9oLEjbTp0ggTiluZD0DlRHsPETQfnyUCFIlRELs4YnAIinHs7Bw5sTmrR/OCQ8 t1kS/eAh7uW9voQHQt2JapvMAE1Gb6GwMXDu55TxyCOymDNYH7Y7rZ5jF+rXyqpkki46 dLwN8BBU8uLvBhlSSRa8ISRCaAO2ybn6x72UsvAg8DMXzy8bNlK2ipXLVGCXlKBbtp7z uzGj32t2zGCn2zjwNRc5cpLlWcTWTOciHnw0WalLI9+Ts8bnT6w5KTzBaBI2JtxQT1l8 JaQDJOQba/Lut4Nyrtx9kUAhSq1ETZRk3W9hEh5QxMJT72smjE+k7QjOIeqYqTmafzAO 48nw== 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=kS+l4558TSW2IRpfLtcys4giVEKCIpfMbgv1l6/bp68=; b=yZU0y3knx1Ib+GqaLakfyTKPDAgZ9CRBGvimgu6zQDJdq7LP46gi6x3E3qaxKpSaYM yp3IDSgpreLwb4ymGwtpAlzeHhRCy45Lr6pwi0/UkO+hgZ1A1V3Wh2kNfyLly4+DMfaN YjfsSjNzZtVxOLNCfAzY8yWQv4ExUgo2vWbGtLUaQTEeirpd0q6OvxCDoL/x/H85c/xi JvMfh0Tgyv8kE4IJIu2qwnE/FPnM4LwEXiNVHMg6071VFIeMT3n4bU4odESPeX79JANq mHiQGlosZ2Eq4HAawiUmM7IpJEjKmNWd/grfQNeu26ufZiZKCAI5NninZsqNBiRlthIT iUxg== 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 u84si2340885qki.114.2017.06.02.07.03.03; Fri, 02 Jun 2017 07:03:03 -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 5DF6D60DFC; Fri, 2 Jun 2017 14:03:03 +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 148E8607DD; Fri, 2 Jun 2017 14:01:20 +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 80BC060682; Fri, 2 Jun 2017 14:01:05 +0000 (UTC) Received: from forward3h.cmail.yandex.net (forward3h.cmail.yandex.net [87.250.230.18]) by lists.linaro.org (Postfix) with ESMTPS id C385460E6D for ; Fri, 2 Jun 2017 14:00:23 +0000 (UTC) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [37.140.190.27]) by forward3h.cmail.yandex.net (Yandex) with ESMTP id BB46C21686 for ; Fri, 2 Jun 2017 17:00:22 +0300 (MSK) Received: from smtp2o.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp2o.mail.yandex.net (Yandex) with ESMTP id ED2545081174 for ; Fri, 2 Jun 2017 17:00:19 +0300 (MSK) Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id cZMbbMEits-0IoS9qmv; Fri, 02 Jun 2017 17:00:18 +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:05 +0300 Message-Id: <1496412007-23455-8-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 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: e6be64e01589f1aa335ea178e8314bf35ad34847 ** Merge commit sha: 6f335855aeda94f83296fb7e0d08b293ea4121db **/ 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 d0766f6c..5bf33270 100644 --- a/configure.ac +++ b/configure.ac @@ -332,8 +332,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 172e8d09..fb749dad 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 +Libs.private: @OPENSSL_STATIC_LIBS@ @DPDK_PMDS@ @DPDK_LIBS@ @PCAP_LIBS@ @PTHREAD_LIBS@ @TIMER_LIBS@ -lpthread Cflags: -I${includedir} diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 616045bc..067b5e07 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -225,6 +225,7 @@ __LIB__libodp_linux_la_SOURCES = \ __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 a2a25408..c6d79b8c 100644 --- a/platform/linux-generic/m4/configure.m4 +++ b/platform/linux-generic/m4/configure.m4 @@ -29,6 +29,7 @@ AC_LINK_IFELSE( exit -1) 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])