]> git.sesse.net Git - vlc/blobdiff - configure.ac
Use the monotonic clock from POSIX real time extension when available.
[vlc] / configure.ac
index 9d834d06af18b53738f40db372c2c8c7531af2a4..465099a70ee620543108329110ea658ce138747f 100644 (file)
@@ -718,8 +718,13 @@ VLC_ADD_LDFLAGS([vlc plugin],[${THREAD_LIB}])
 
 dnl Don't link with rt when using GNU-pth
 if test "${THREAD_LIB}" != "-lpth" && test "${THREAD_LIB}" != "-lst"; then
-  dnl HP/UX port
-  AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LDFLAGS([vlc],[-lrt])])
+  AC_CHECK_LIB(rt, clock_gettime, [
+    VLC_ADD_LDFLAGS([vlc],[-lrt])
+    AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define to 1 if you have clock_gettime.])
+  ], [
+    dnl HP/UX port
+    AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LDFLAGS([vlc],[-lrt])])
+  ])
 
   have_nanosleep=false
   AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[