[vlc-devel] [PATCH 2/2] configure.ac: Don't check for clock_nanosleep on win32

Hugo Beauzée-Luyssen hugo at beauzee.fr
Tue Jan 15 11:50:44 CET 2019


Now that we use winpthreads, configure finds clock_nanosleep there,
causing -pthread to be added to the libvlccore requirement, while we
don't use it for win32.
---
 configure.ac | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index d419737124..1b63a74736 100644
--- a/configure.ac
+++ b/configure.ac
@@ -799,14 +799,16 @@ AM_CONDITIONAL([HAVE_DYNAMIC_PLUGINS], [test "${have_dynamic_objects}" != "no"])
 
 AC_SUBST([LIBDL])
 
-AC_SEARCH_LIBS([clock_nanosleep], [rt pthread], [
-  AS_IF([test "$ac_cv_search_clock_nanosleep" != "none required"], [
-    LIBRT="$ac_cv_search_clock_nanosleep"
-  ])
-], [
-  AC_SEARCH_LIBS([nanosleep], [rt pthread posix4], [
-    AS_IF([test "$ac_cv_search_nanosleep" != "none required"], [
-      LIBRT="$ac_cv_search_nanosleep"
+AS_IF([test "${SYS}" != "mingw32"], [
+  AC_SEARCH_LIBS([clock_nanosleep], [rt pthread], [
+    AS_IF([test "$ac_cv_search_clock_nanosleep" != "none required"], [
+      LIBRT="$ac_cv_search_clock_nanosleep"
+    ])
+  ], [
+    AC_SEARCH_LIBS([nanosleep], [rt pthread posix4], [
+      AS_IF([test "$ac_cv_search_nanosleep" != "none required"], [
+        LIBRT="$ac_cv_search_nanosleep"
+      ])
     ])
   ])
 ])
-- 
2.20.1



More information about the vlc-devel mailing list