From patchwork Wed Jun 19 06:14:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Gray X-Patchwork-Id: 2747271 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AA7159F968 for ; Wed, 19 Jun 2013 06:48:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0BD89201B8 for ; Wed, 19 Jun 2013 06:48:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 24D5A20202 for ; Wed, 19 Jun 2013 06:48:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2382E628D for ; Tue, 18 Jun 2013 23:48:16 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org X-Greylist: delayed 2020 seconds by postgrey-1.32 at gabe; Tue, 18 Jun 2013 23:48:07 PDT Received: from lechuck.jsg.id.au (jsg.id.au [210.15.216.215]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EAB3E6249 for ; Tue, 18 Jun 2013 23:48:07 -0700 (PDT) Received: from carla.jsg.id.au (root@carla.jsg.id.au [192.168.1.42]) by lechuck.jsg.id.au (8.14.6/8.14.6) with ESMTP id r5J6EPp1030663 for ; Wed, 19 Jun 2013 16:14:25 +1000 (EST) Received: from carla.jsg.id.au (jsg@localhost.jsg.id.au [127.0.0.1]) by carla.jsg.id.au (8.14.6/8.14.3) with ESMTP id r5J6EPii021592 for ; Wed, 19 Jun 2013 16:14:25 +1000 (EST) Received: (from jsg@localhost) by carla.jsg.id.au (8.14.6/8.14.3/Submit) id r5J6EPoZ028061 for intel-gfx@lists.freedesktop.org; Wed, 19 Jun 2013 16:14:25 +1000 (EST) Date: Wed, 19 Jun 2013 16:14:25 +1000 From: Jonathan Gray To: intel-gfx@lists.freedesktop.org Message-ID: <20130619061425.GA15891@mail.netspace.net.au> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Subject: [Intel-gfx] [PATCH xf86-video-intel] test if librt is required for clock_gettime X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP clock_gettime is in libc not librt on OpenBSD so check to see if linking librt is required. Signed-off-by: Jonathan Gray --- configure.ac | 4 ++++ test/Makefile.am | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git configure.ac configure.ac index 3f6f9bd..26688a3 100644 --- configure.ac +++ configure.ac @@ -374,6 +374,10 @@ PKG_CHECK_MODULES(DRI, [xf86driproto], , DRI=no) PKG_CHECK_MODULES(DRI2, [dri2proto >= 2.6],, DRI2=no) PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10]) +LIBS="" +AC_SEARCH_LIBS(clock_gettime, rt, [CLOCK_GETTIME_LIBS=$LIBS]) +AC_SUBST(CLOCK_GETTIME_LIBS) + sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` if test "x$enable_dri" != "xno"; then diff --git test/Makefile.am test/Makefile.am index c3610f2..f51967b 100644 --- test/Makefile.am +++ test/Makefile.am @@ -25,7 +25,7 @@ check_PROGRAMS = $(stress_TESTS) noinst_PROGRAMS = lowlevel-blt-bench AM_CFLAGS = @CWARNFLAGS@ @X11_CFLAGS@ @DRM_CFLAGS@ -LDADD = libtest.la @X11_LIBS@ -lXfixes @DRM_LIBS@ -lrt +LDADD = libtest.la @X11_LIBS@ -lXfixes @DRM_LIBS@ @CLOCK_GETTIME_LIBS@ noinst_LTLIBRARIES = libtest.la libtest_la_SOURCES = \