Commit 7778302e authored by Rafaël Carré's avatar Rafaël Carré

Fix thread library check

Don't use ac_cv_search cached value because it could contain
"no" or "none required" which aren't valid link flags

AC_CHECK_LIB(main, xxx) did not exactly search for main symbol, it
searched for the presence of the library.
Instead we look for a required symbol.

We don't use e.g. pthread_mutex_lock because some pthread symbols
are available in glibc, but not all.

Not finding pthread library is not an error, because at least OS/2 and
symbian don't need it. (We skip the check on Windows already)
parent da830625
......@@ -633,11 +633,11 @@ VLC_ADD_LIBS([realvideo lua],[$LIBDL])
dnl Check for thread library
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
VLC_SAVE_FLAGS
AC_SEARCH_LIBS(main, pthread pthreads c_r, [
VLC_ADD_LIBS([libvlccore libvlc vlc plugin],[${ac_cv_search_main}])
], [
AC_CHECK_FUNCS(pthread_mutex_lock)
LIBS=""
AC_SEARCH_LIBS(pthread_rwlock_init, pthread pthreads c_r, [
VLC_ADD_LIBS([libvlccore libvlc vlc plugin],[${LIBS}])
])
VLC_RESTORE_FLAGS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment