diff options
author | Jonathan Gray <jsg@jsg.id.au> | 2013-06-19 11:30:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-19 11:30:24 +0100 |
commit | 6132400365f8f467d838ed26002e74412e1c7298 (patch) | |
tree | b207b8728eb4e4722e26592bef0241940f00a8f7 | |
parent | f567f19b37d00131cda749e31c6d2dc8b52a1d62 (diff) |
configure: test for librt (clock_gettime)
clock_gettime() is in libc not librt on OpenBSD so check
to see if linking librt is required.
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/sna/Makefile.am | 2 | ||||
-rw-r--r-- | test/Makefile.am | 2 |
4 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 3f6f9bda..26688a3f 100644 --- a/configure.ac +++ b/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 a/src/Makefile.am b/src/Makefile.am index feed4cec..80837568 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -95,6 +95,7 @@ intel_drv_la_SOURCES += \ $(NULL) intel_drv_la_LIBADD += \ $(DRI_LIBS) \ + @CLOCK_GETTIME_LIBS@ \ $(NULL) endif diff --git a/src/sna/Makefile.am b/src/sna/Makefile.am index ed6fad2b..56ad9365 100644 --- a/src/sna/Makefile.am +++ b/src/sna/Makefile.am @@ -94,7 +94,7 @@ libsna_la_SOURCES = \ if DRI2 AM_CFLAGS += @DRI_CFLAGS@ libsna_la_SOURCES += sna_dri.c -libsna_la_LIBADD += $(DRI_LIBS) +libsna_la_LIBADD += $(DRI_LIBS) @CLOCK_GETTIME_LIBS@ endif if XVMC diff --git a/test/Makefile.am b/test/Makefile.am index c3610f2a..f51967bd 100644 --- a/test/Makefile.am +++ b/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 = \ |