summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2016-12-19 18:20:09 +0100
committerQuentin Glidic <sardemff7+git@sardemff7.net>2017-01-15 13:51:13 +0100
commitb51e6ed7100afd1b58b3b1988e08cec7de0fee86 (patch)
treece8b5c32fe5f079981df9a206763d717ae4682f9
parent226408d2f44e1da98631aa279fbffceb9201db4b (diff)
configure: search for lib with clock_getres()
Like clock_gettime(), clock_getres() is in -lrt for glibc < 2.17. Add a check for it, like is done for clock_gettime(). Fixes: http://autobuild.buildroot.net/results/bce/bcecdbbce4a99eb1e9bfbf519857bf94d8952037/ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac3
2 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 2219e3d5..53f8f51d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -190,6 +190,7 @@ weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS)
weston_LDADD = libshared.la libweston-@LIBWESTON_MAJOR@.la \
$(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \
$(DLOPEN_LIBS) $(LIBINPUT_BACKEND_LIBS) \
+ $(CLOCK_GETRES_LIBS) \
-lm
weston_SOURCES = \
diff --git a/configure.ac b/configure.ac
index 247aa696..033f8964 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,8 +88,9 @@ PKG_PROG_PKG_CONFIG()
WESTON_SEARCH_LIBS([DLOPEN], [dl], [dlopen])
-# In old glibc versions (< 2.17) clock_gettime() is in librt
+# In old glibc versions (< 2.17) clock_gettime() and clock_getres() are in librt
WESTON_SEARCH_LIBS([CLOCK_GETTIME], [rt], [clock_gettime])
+WESTON_SEARCH_LIBS([CLOCK_GETRES], [rt], [clock_getres])
AC_CHECK_DECL(SFD_CLOEXEC,[],
[AC_MSG_ERROR("SFD_CLOEXEC is needed to compile weston")],