[vlc-commits] libxml2: pthread_join might be available without libpthread
Rafaël Carré
git at videolan.org
Wed Aug 8 00:35:31 CEST 2012
vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Tue May 29 12:53:49 2012 -0400| [6202035573a2c38867a8975038d40c79b793ca29] | committer: Jean-Baptiste Kempf
libxml2: pthread_join might be available without libpthread
(cherry picked from commit f8aa3950318b1b13a3b51b8c862a8a2c92d17229)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=6202035573a2c38867a8975038d40c79b793ca29
---
contrib/src/libxml2/pthread.patch | 22 ++++++++++++++++++++++
contrib/src/libxml2/rules.mak | 1 +
2 files changed, 23 insertions(+)
diff --git a/contrib/src/libxml2/pthread.patch b/contrib/src/libxml2/pthread.patch
new file mode 100644
index 0000000..1984010
--- /dev/null
+++ b/contrib/src/libxml2/pthread.patch
@@ -0,0 +1,22 @@
+--- libxml2/configure.in.orig 2012-05-29 12:43:39.843757694 -0400
++++ libxml2/configure.in 2012-05-29 12:47:39.347755607 -0400
+@@ -913,12 +913,17 @@
+ echo Enabling multithreaded support
+ dnl Use pthread by default
+ if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then
++ LIBS_saved="$LIBS"
+ AC_CHECK_HEADER(pthread.h,
+- AC_CHECK_LIB(pthread, pthread_join,[
+- THREAD_LIBS="-lpthread"
++ AC_SEARCH_LIBS(pthread_join, pthread,[
++ THREAD_LIBS="$ac_cv_search_pthread_join"
++ if test "$THREAD_LIBS" = "none required"; then
++ THREAD_LIBS=""
++ fi
+ AC_DEFINE([HAVE_LIBPTHREAD], [], [Define if pthread library is there (-lpthread)])
+ AC_DEFINE([HAVE_PTHREAD_H], [], [Define if <pthread.h> is there])
+ WITH_THREADS="1"]))
++ LIBS="$LIBS_saved"
+ fi
+ case $host_os in
+ *mingw32*) if test "$THREAD_LIBS" != "-lpthread"; then
diff --git a/contrib/src/libxml2/rules.mak b/contrib/src/libxml2/rules.mak
index cf81b62..5923f84 100644
--- a/contrib/src/libxml2/rules.mak
+++ b/contrib/src/libxml2/rules.mak
@@ -18,6 +18,7 @@ XMLCONF = --with-minimal --with-catalog --with-reader --with-tree --with-push --
libxml2: libxml2-$(LIBXML2_VERSION).tar.gz .sum-libxml2
$(UNPACK)
$(APPLY) $(SRC)/libxml2/no-tests.patch
+ $(APPLY) $(SRC)/libxml2/pthread.patch
$(MOVE)
.libxml2: libxml2
More information about the vlc-commits
mailing list