0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

configure: link with -lrt

In order to use clock_gettime() (which we need for use with
pthread_cond_timedwait()), most glibc versions need to link with -lrt.
This commit is contained in:
wm4 2013-07-08 01:53:59 +02:00
parent f630ee1597
commit bfe0207a7a

16
configure vendored
View File

@ -1271,6 +1271,22 @@ else
fi
echores "$_pthreads"
if test "$_pthreads" = yes ; then
# Cargo-cult for -lrt, which is needed on not so recent glibc version for
# clock_gettime. It's documented as required before before glibc 2.17, which
# was released in december 2012. On newer glibc versions or on other systems,
# this will hopefully do nothing.
echocheck "linking with -lrt"
_rt=no
cc_check "-lrt" && _rt=yes
if test "$_rt" = yes ; then
_ld_pthread="$_ld_pthread -lrt"
fi
echores "$_rt"
fi
echocheck "stream cache"
_stream_cache="$_pthreads"
if test "$_stream_cache" = yes ; then