[vlc-commits] Define explicit makefile variable for libpthread
Rémi Denis-Courmont
git at videolan.org
Sun Sep 9 15:29:54 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Sep 9 16:22:26 2012 +0300| [5282cbf1d8454ae80b6630300c8778d2ff99d38d] | committer: Rémi Denis-Courmont
Define explicit makefile variable for libpthread
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5282cbf1d8454ae80b6630300c8778d2ff99d38d
---
bin/Makefile.am | 2 +-
configure.ac | 11 +++++++----
lib/Makefile.am | 4 ++--
modules/common.am | 2 +-
src/Makefile.am | 2 +-
5 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/bin/Makefile.am b/bin/Makefile.am
index c1a9548..4a8e555 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -30,7 +30,7 @@ vlc_wrapper_SOURCES = rootwrap.c
vlc_wrapper_LDADD = $(SOCKET_LIBS)
vlc_LDFLAGS = $(LDFLAGS_vlc)
-vlc_LDADD = ../lib/libvlc.la $(LIBS_vlc)
+vlc_LDADD = ../lib/libvlc.la $(LIBPTHREAD)
vlc_static_SOURCES = $(vlc_SOURCES)
vlc_static_CFLAGS = $(AM_CFLAGS) \
diff --git a/configure.ac b/configure.ac
index fbb079f..7107188 100644
--- a/configure.ac
+++ b/configure.ac
@@ -658,12 +658,14 @@ AC_SUBST(LIBDL)
VLC_ADD_LIBS([lua],[$LIBDL])
dnl Check for thread library
-if test "${SYS}" != "mingw32"; then
-
+LIBPTHREAD=""
+AS_IF([test "${SYS}" != "mingw32"], [
VLC_SAVE_FLAGS
LIBS=""
AC_SEARCH_LIBS(pthread_rwlock_init, pthread pthreads c_r, [
- VLC_ADD_LIBS([libvlccore libvlc vlc plugin],[${LIBS}])
+ AS_IF([test "$ac_cv_search_pthread_rwlock_init" != "none required"], [
+ LIBPTHREAD="$ac_cv_search_pthread_rwlock_init"
+ ])
])
VLC_RESTORE_FLAGS
@@ -682,7 +684,8 @@ if test "${SYS}" != "mingw32"; then
dnl HP/UX port
AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlccore],[-lrt])])
])
-fi # end "${SYS}" != "mingw32"
+])
+AC_SUBST(LIBPTHREAD)
dnl Check for headers
AC_CHECK_HEADERS([search.h])
diff --git a/lib/Makefile.am b/lib/Makefile.am
index ad9ce00..72dc66c 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -55,8 +55,8 @@ libvlc_la_SOURCES = \
../src/revision.c
EXTRA_DIST = libvlc.pc.in libvlc.sym ../include/vlc/libvlc_version.h.in
-libvlc_la_LIBADD = $(LIBS_libvlc) \
- ../src/libvlccore.la ../compat/libcompat.la $(LIBM)
+libvlc_la_LIBADD = \
+ ../src/libvlccore.la ../compat/libcompat.la $(LIBPTHREAD) $(LIBM)
libvlc_la_LDFLAGS = \
$(LDFLAGS_libvlc) \
-no-undefined \
diff --git a/modules/common.am b/modules/common.am
index a8f7d5d..806dec0 100644
--- a/modules/common.am
+++ b/modules/common.am
@@ -31,7 +31,7 @@ AM_LDFLAGS = -rpath '$(libvlcdir)' \
-export-symbols-regex ^vlc_entry \
-shrext $(LIBEXT) \
-no-undefined
-AM_LIBADD = $(LTLIBVLCCORE) $(top_builddir)/compat/libcompat.la $(LIBS_plugin)
+AM_LIBADD = $(LTLIBVLCCORE) $(top_builddir)/compat/libcompat.la $(LIBPTHREAD)
include $(srcdir)/Modules.am
diff --git a/src/Makefile.am b/src/Makefile.am
index befa6f5..9ac25d3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -189,7 +189,7 @@ libvlccore_la_LDFLAGS = \
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
../compat/libcompat.la \
$(LTLIBINTL) $(LTLIBICONV) \
- $(IDN_LIBS) $(SOCKET_LIBS) $(LIBDL) $(LIBM)
+ $(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBDL) $(LIBM)
libvlccore_la_DEPENDENCIES = libvlccore.sym
if HAVE_WIN32
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
More information about the vlc-commits
mailing list