[VDPAU] [PATCH 1/4] configure: add test for POSIX threads

Rémi Denis-Courmont remi at remlab.net
Wed Oct 29 05:46:59 PDT 2014


From: Rémi Denis-Courmont <remid at nvidia.com>

---
 configure.ac | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index 29ad593..725b074 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,6 +43,14 @@ AC_CHECK_FUNC([dlopen], [],
         AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
 AC_SUBST([DLOPEN_LIBS])
 
+# Look for POSIX threads
+AC_SEARCH_LIBS([pthread_once], [pthread pthreads c_r], [
+    AS_IF([test "$ac_cv_search_pthread_once" != "none required"], [
+        PTHREAD_LIBS="$ac_cv_search_pthread_once"
+    ])
+])
+AC_SUBST([PTHREAD_LIBS])
+
 # Check for Doxygen.
 AC_ARG_ENABLE(documentation, AS_HELP_STRING([--disable-documentation], [Disable Doxygen documentation (default: auto)]), [DOCS=$enableval], [DOCS=auto])
 if test "x$DOCS" != xno; then
-- 
1.9.1



More information about the VDPAU mailing list