diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.ac | 30 | ||||
-rw-r--r-- | src/libmusepack/Makefile.am | 17 | ||||
-rw-r--r-- | src/libmusepack/xine_decoder.c | 8 |
4 files changed, 56 insertions, 4 deletions
@@ -55,6 +55,11 @@ xine-lib (1.1.4) Note: currently both uncommon/popular codecs are _build_ but disabled. that is, build system still need some improvements to really save memory. * Fix possible division by zero when pausing. + * Allow disabling build of musepack decoder through a ./configure parameter + (--disable-musepack). + * Allow using external libmpcdec for MusePack decoding rather than the + internal copy of an old libmusepack, through a ./configure parameter + (--with-external-libmpcdec). xine-lib (1.1.3) * Security fixes: diff --git a/configure.ac b/configure.ac index 07ba75fd2..a4a6e8348 100644 --- a/configure.ac +++ b/configure.ac @@ -1311,6 +1311,29 @@ AM_CONDITIONAL(MAD, test "x$enable_libmad" = "xyes") AM_CONDITIONAL(EXTERNAL_LIBMAD, test "x$have_mad" = "xyes") dnl --------------------------------------------- +dnl External libmpcdec support +dnl --------------------------------------------- + +AC_ARG_ENABLE([musepack], AC_HELP_STRING([--disable-musepack], [Disable support for MusePack decoding (default: enabled)])) +AC_ARG_WITH([external-libmpcdec], AC_HELP_STRING([--with-external-libmpcdec], [Use external libmpc library])) + +if test "x$enable_musepack" = "xno"; then + AC_MSG_RESULT([musepack support disabled]) +elif test "x$with_external_libmpcdec" = "xyes"; then + AC_CHECK_LIB([mpcdec], [mpc_decoder_decode], [have_mpcdec=yes]) + AC_CHECK_HEADERS([mpcdec/mpcdec.h], , [have_mpcdec=no]) + if test "x$have_mpcdec" != "xyes"; then + AC_MSG_ERROR([Unable to find mpcdec]) + fi + AC_DEFINE([HAVE_LIBMPC], [1], [Define if external libmpc is used]) +else + AC_MSG_RESULT([Use included libmusepack]) +fi + +AM_CONDITIONAL([MUSEPACK], [test "x$enable_musepack" != "xno"]) +AM_CONDITIONAL([EXTERNAL_MPCDEC], [test "x$have_mpcdec" = "xyes"]) + +dnl --------------------------------------------- dnl MNG libs. dnl --------------------------------------------- @@ -2839,6 +2862,13 @@ if test "x$enable_a52dec" = "xyes"; then echo " - A52/ra-dnet (internal library)" fi fi +if test "x$enable_musepack" != "xno"; then + if test "x$have_mpcdec" = "xyes"; then + echo " - MusePack (external library)" + else + echo " - MusePack (internal library)" + fi +fi echo "" dnl spu decoders diff --git a/src/libmusepack/Makefile.am b/src/libmusepack/Makefile.am index 477dc31f9..021ec0985 100644 --- a/src/libmusepack/Makefile.am +++ b/src/libmusepack/Makefile.am @@ -6,11 +6,24 @@ EXTRA_DIST = diff_against_svn.patch libdir = $(XINE_PLUGINDIR) +if MUSEPACK lib_LTLIBRARIES = xineplug_decode_mpc.la +endif -xineplug_decode_mpc_la_SOURCES = huffsv46.c huffsv7.c idtag.c mpc_decoder.c \ - mpc_reader.c requant.c streaminfo.c synth_filter.c xine_decoder.c +if EXTERNAL_MPCDEC +internal_sources = +else +internal_sources = huffsv46.c huffsv7.c idtag.c mpc_decoder.c \ + mpc_reader.c requant.c streaminfo.c synth_filter.c +endif + +if EXTERNAL_MPCDEC +xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) -lmpcdec +else xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) +endif + +xineplug_decode_mpc_la_SOURCES = $(internal_sources) xine_decoder.c xineplug_decode_mpc_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_decode_mpc_la_LDFLAGS = -avoid-version -module diff --git a/src/libmusepack/xine_decoder.c b/src/libmusepack/xine_decoder.c index 03d43fb63..26c2eddf5 100644 --- a/src/libmusepack/xine_decoder.c +++ b/src/libmusepack/xine_decoder.c @@ -23,7 +23,7 @@ * 32bit float output * Seeking?? * - * $Id: xine_decoder.c,v 1.9 2006/07/10 22:08:29 dgp85 Exp $ + * $Id: xine_decoder.c,v 1.10 2007/01/19 02:35:36 dgp85 Exp $ */ #include <stdio.h> @@ -43,7 +43,11 @@ #include "buffer.h" #include "xineutils.h" -#include "musepack/musepack.h" +#ifdef HAVE_MPCDEC_MPCDEC_H +# include <mpcdec/mpcdec.h> +#else +# include "musepack/musepack.h" +#endif #define MPC_DECODER_MEMSIZE 65536 #define MPC_DECODER_MEMSIZE2 (MPC_DECODER_MEMSIZE/2) |