configure: Also check for clock_gettime in libpthread
authorРуслан Ижбулатов <lrn1986@gmail.com>
Mon, 8 Apr 2013 09:14:35 +0000 (13:14 +0400)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Tue, 9 Apr 2013 18:34:35 +0000 (20:34 +0200)
libwinpthreads provides POSIX time API.
It also provides libpthread alias for itself, for compatibility, so that
is what we will link with.

Fixes #697550

configure.ac

index 1063828..34b7448 100644 (file)
@@ -458,6 +458,11 @@ AC_CHECK_FUNCS(clock_gettime, [], [
   AC_CHECK_LIB(rt, clock_gettime, [
     AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
     LIBS="$LIBS -lrt"
+  ], [
+    AC_CHECK_LIB(pthread, clock_gettime, [
+      AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
+      LIBS="$LIBS -lpthread"
+    ])
   ])
 ])