diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2005-05-29 00:47:48 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2005-05-29 00:47:48 +0000 |
commit | 6960cf68d485d61bf2383d7029ab232eb6313606 (patch) | |
tree | 1723017ff6ceac6b1bf078407389516422ee419c /src | |
parent | dd396b2d74bcfc23dd4b0c4869afe2d8bb7f926e (diff) | |
download | xine-lib-6960cf68d485d61bf2383d7029ab232eb6313606.tar.gz xine-lib-6960cf68d485d61bf2383d7029ab232eb6313606.tar.bz2 |
added --with-external-a52dec and --with-external-libmad switches
thanks Diego 'Flameeyes' Petten
CVS patchset: 7589
CVS date: 2005/05/29 00:47:48
Diffstat (limited to 'src')
-rw-r--r-- | src/liba52/Makefile.am | 20 | ||||
-rw-r--r-- | src/liba52/xine_decoder.c | 19 | ||||
-rw-r--r-- | src/libmad/Makefile.am | 18 | ||||
-rw-r--r-- | src/libmad/xine_decoder.c | 7 |
4 files changed, 53 insertions, 11 deletions
diff --git a/src/liba52/Makefile.am b/src/liba52/Makefile.am index 6857bcea3..d786ab250 100644 --- a/src/liba52/Makefile.am +++ b/src/liba52/Makefile.am @@ -4,16 +4,28 @@ libdir = $(XINE_PLUGINDIR) lib_LTLIBRARIES = xineplug_decode_a52.la -xineplug_decode_a52_la_SOURCES = \ +if EXTERNAL_A52DEC +internal_sources = +else +internal_sources = \ bitstream.c \ bit_allocate.c \ - crc.c \ downmix.c \ imdct.c \ - parse.c \ - xine_decoder.c + parse.c +endif + +xineplug_decode_a52_la_SOURCES = \ + crc.c \ + xine_decoder.c \ + $(internal_sources) +if EXTERNAL_A52DEC +xineplug_decode_a52_la_LIBADD = $(XINE_LIB) -la52 -lm +else xineplug_decode_a52_la_LIBADD = $(XINE_LIB) +endif + xineplug_decode_a52_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ noinst_HEADERS = \ diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c index 74998e50e..3b5018268 100644 --- a/src/liba52/xine_decoder.c +++ b/src/liba52/xine_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.75 2005/05/28 11:24:35 jstembridge Exp $ + * $Id: xine_decoder.c,v 1.76 2005/05/29 00:47:48 miguelfreitas Exp $ * * stuff needed to turn liba52 into a xine decoder plugin */ @@ -29,6 +29,8 @@ /* avoid compiler warnings */ #define _BSD_SOURCE 1 +#include <config.h> + #include <stdlib.h> #include <unistd.h> #include <string.h> @@ -46,8 +48,19 @@ #include "xine_internal.h" #include "audio_out.h" -#include "a52.h" -#include "a52_internal.h" + +#ifdef HAVE_A52DEC_A52_H +# include <a52dec/a52.h> +#else +# include "a52.h" +#endif + +#ifdef HAVE_A52DEC_A52_INTERNAL_H +# include <a52dec/a52_internal.h> +#else +# include "a52_internal.h" +#endif + #include "buffer.h" #include "xineutils.h" diff --git a/src/libmad/Makefile.am b/src/libmad/Makefile.am index 4d4d4a3d7..cf34f36f5 100644 --- a/src/libmad/Makefile.am +++ b/src/libmad/Makefile.am @@ -8,7 +8,10 @@ libdir = $(XINE_PLUGINDIR) lib_LTLIBRARIES = xineplug_decode_mad.la -xineplug_decode_mad_la_SOURCES = \ +if EXTERNAL_LIBMAD +internal_sources = +else +internal_sources = \ bit.c \ fixed.c \ frame.c \ @@ -18,10 +21,19 @@ xineplug_decode_mad_la_SOURCES = \ stream.c \ synth.c \ timer.c \ - version.c \ - xine_decoder.c + version.c +endif + +xineplug_decode_mad_la_SOURCES = \ + xine_decoder.c \ + $(internal_sources) +if EXTERNAL_LIBMAD +xineplug_decode_mad_la_LIBADD = $(XINE_LIB) $(LIBMAD_LIBS) +xineplug_decode_mad_la_CFLAGS = $(LIBMAD_CFLAGS) +else xineplug_decode_mad_la_LIBADD = $(XINE_LIB) +endif xineplug_decode_mad_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ noinst_HEADERS = \ diff --git a/src/libmad/xine_decoder.c b/src/libmad/xine_decoder.c index 415a4dd74..4b1cdd11c 100644 --- a/src/libmad/xine_decoder.c +++ b/src/libmad/xine_decoder.c @@ -17,13 +17,18 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_decoder.c,v 1.53 2004/12/16 13:59:11 mroi Exp $ + * $Id: xine_decoder.c,v 1.54 2005/05/29 00:47:48 miguelfreitas Exp $ * * stuff needed to turn libmad into a xine decoder plugin */ #include <stdlib.h> #include <string.h> +#include <config.h> + +#ifdef HAVE_MAD_H +#include <mad.h> +#endif #define LOG_MODULE "mad_decoder" #define LOG_VERBOSE |