From bfe0207a7a7fed8e9fe8643fbd99d5f15abefaad Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 8 Jul 2013 01:53:59 +0200 Subject: 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. --- configure | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 2c9b98e04d..9299a0c26d 100755 --- a/configure +++ b/configure @@ -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 -- cgit v1.2.3 From 49bf0fb9dffdd8b39e68c4e423bbab653d3db396 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 8 Jul 2013 02:24:42 +0200 Subject: configure: fix previous commit This doesn't help if -pthread is omitted. (Apparently, glibc 2.17, on which I tested the previous commit, doesn't require -lpthread in order to use pthreads either.) --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 9299a0c26d..e3fc0766fb 100755 --- a/configure +++ b/configure @@ -1279,7 +1279,7 @@ if test "$_pthreads" = yes ; then # this will hopefully do nothing. echocheck "linking with -lrt" _rt=no -cc_check "-lrt" && _rt=yes +cc_check "$_ld_pthread -lrt" && _rt=yes if test "$_rt" = yes ; then _ld_pthread="$_ld_pthread -lrt" fi -- cgit v1.2.3 From 09250d9921304ae988de756fa9cb33d86758b519 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 8 Jul 2013 18:00:10 +0200 Subject: configure: make zlib non-optional This is needed by demux_mkv to decode files with compressed tracks. Requested by nikoli. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index e3fc0766fb..3168202f73 100755 --- a/configure +++ b/configure @@ -2468,7 +2468,7 @@ if test "$_zlib" = yes ; then def_zlib='#define CONFIG_ZLIB 1' libs_mplayer="$libs_mplayer -lz" else - def_zlib='#define CONFIG_ZLIB 0' + die "Unable to find development files for libass." fi echores "$_zlib" -- cgit v1.2.3 From 7a71a2cc483d17bed94408d5aee6fba6893558cb Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 8 Jul 2013 21:29:01 +0200 Subject: configure: fix oversight in log message --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure') diff --git a/configure b/configure index 3168202f73..f84cff678d 100755 --- a/configure +++ b/configure @@ -2468,7 +2468,7 @@ if test "$_zlib" = yes ; then def_zlib='#define CONFIG_ZLIB 1' libs_mplayer="$libs_mplayer -lz" else - die "Unable to find development files for libass." + die "Unable to find development files for zlib." fi echores "$_zlib" -- cgit v1.2.3