diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-01-07 11:47:52 -0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-01-07 11:47:52 -0800 |
commit | badc63464cbd64606c6dff9ea561a787d072fd5f (patch) | |
tree | 66d7fe7ca2d94052f156f7cf27ff25ef243b53ec | |
parent | ca37077fb78b69a00500827f1db12b70affa1514 (diff) |
libdrm: add autoconf check for clock_gettime
Should be more portable this way.
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | libdrm/Makefile.am | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index ccc58ef7..11d238cf 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,13 @@ AC_DEFUN([LIBDRM_CC_TRY_FLAG], [ AC_MSG_RESULT([$libdrm_cc_flag]) ]) +dnl We use clock_gettime to check for timeouts in drmWaitVBlank + +AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=], + [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt], + [AC_MSG_ERROR([Couldn't find clock_gettime])])]) +AC_SUBST([CLOCK_LIB]) + dnl Use lots of warning flags with with gcc and compatible compilers dnl Note: if you change the following variable, the cache is automatically diff --git a/libdrm/Makefile.am b/libdrm/Makefile.am index 71a87186..a568aacf 100644 --- a/libdrm/Makefile.am +++ b/libdrm/Makefile.am @@ -23,7 +23,7 @@ SUBDIRS = . intel libdrm_la_LTLIBRARIES = libdrm.la libdrm_ladir = $(libdir) libdrm_la_LDFLAGS = -version-number 2:4:0 -no-undefined -libdrm_la_LIBADD = -lrt +libdrm_la_LIBADD = @CLOCK_LIB@ AM_CFLAGS = -I$(top_srcdir)/shared-core libdrm_la_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c xf86drmSL.c \ |