mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-27 04:21:53 +02:00
configure: revamp real-time run-time library checks
Avoid linking with -lrt if not needed (e.g. recent GNU/libc), simplify, and enable linking other library than libvlccore.
This commit is contained in:
parent
56fd4ad559
commit
641de51d46
29
configure.ac
29
configure.ac
@ -743,25 +743,22 @@ AS_IF([test "${SYS}" != "mingw32"], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
VLC_RESTORE_FLAGS
|
VLC_RESTORE_FLAGS
|
||||||
|
|
||||||
AC_CHECK_LIB(rt, clock_nanosleep, [
|
|
||||||
VLC_ADD_LIBS([libvlccore],[-lrt])
|
|
||||||
], [
|
|
||||||
AC_CHECK_FUNC(nanosleep,,[
|
|
||||||
AC_CHECK_LIB(rt,nanosleep, [
|
|
||||||
VLC_ADD_LIBS([libvlccore],[-lrt])
|
|
||||||
], [
|
|
||||||
AC_CHECK_LIB(posix4,nanosleep, [
|
|
||||||
VLC_ADD_LIBS([libvlccore],[-lposix4])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
])
|
|
||||||
dnl HP/UX port
|
|
||||||
AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlccore],[-lrt])])
|
|
||||||
])
|
|
||||||
])
|
])
|
||||||
AC_SUBST(LIBPTHREAD)
|
AC_SUBST(LIBPTHREAD)
|
||||||
|
|
||||||
|
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"
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
AC_SUBST(LIBRT)
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Check for headers
|
dnl Check for headers
|
||||||
dnl
|
dnl
|
||||||
|
@ -188,7 +188,7 @@ libvlccore_la_LDFLAGS = \
|
|||||||
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
|
libvlccore_la_LIBADD = $(LIBS_libvlccore) \
|
||||||
../compat/libcompat.la \
|
../compat/libcompat.la \
|
||||||
$(LTLIBINTL) $(LTLIBICONV) \
|
$(LTLIBINTL) $(LTLIBICONV) \
|
||||||
$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBDL) $(LIBM)
|
$(IDN_LIBS) $(LIBPTHREAD) $(SOCKET_LIBS) $(LIBRT) $(LIBDL) $(LIBM)
|
||||||
libvlccore_la_DEPENDENCIES = libvlccore.sym
|
libvlccore_la_DEPENDENCIES = libvlccore.sym
|
||||||
if HAVE_WIN32
|
if HAVE_WIN32
|
||||||
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
|
libvlccore_la_DEPENDENCIES += libvlc_win32_rc.$(OBJEXT)
|
||||||
|
Loading…
Reference in New Issue
Block a user