summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2005-09-12 01:06:58 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2005-09-12 01:06:58 +0000
commit2992200b707689cd51e4641fab0c962c142a3313 (patch)
treef398e9f26349487b5249a8efaa1f4c50e4d9be23
parent7ab3a9ffdb889c57dfc4b73b8bf26ebb8d1dc5b8 (diff)
downloadxine-lib-2992200b707689cd51e4641fab0c962c142a3313.tar.gz
xine-lib-2992200b707689cd51e4641fab0c962c142a3313.tar.bz2
new Flameeyes's configure patches
CVS patchset: 7730 CVS date: 2005/09/12 01:06:58
-rw-r--r--configure.ac76
-rw-r--r--src/liba52/Makefile.am6
-rw-r--r--src/libdts/Makefile.am22
-rw-r--r--src/libffmpeg/audio_decoder.c4
-rw-r--r--src/libmad/Makefile.am6
5 files changed, 99 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 791a5f8ba..be41441d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1143,12 +1143,16 @@ dnl ---------------------------------------------
dnl External version of a52dec
dnl ---------------------------------------------
+AC_ARG_ENABLE(a52dec, AC_HELP_STRING([--disable-a52dec], [Disable support for a52dec decoding library (default: enabled)]),
+ [enable_a52dec="$enableval"], [enable_a52dec="yes"])
AC_ARG_WITH(external-a52dec, AC_HELP_STRING([--with-external-a52dec], [use external a52dec library (not recommended)]),
[external_a52dec="$withval"], [external_a52dec="no"])
have_a52="no"
-if test x"$external_a52dec" = "xyes"; then
+if test x"$enable_a52dec" = "xno"; then
+ AC_MSG_RESULT([a52dec support disabled])
+elif test x"$external_a52dec" = "xyes"; then
have_a52="yes"
AC_CHECK_HEADERS([a52dec/a52.h a52dec/a52_internal.h],, have_a52="no",
[
@@ -1175,17 +1179,23 @@ else
AC_MSG_RESULT([Use included a52dec support])
fi
+AM_CONDITIONAL(A52, test x"$enable_a52dec" = "xyes")
AM_CONDITIONAL(EXTERNAL_A52DEC, test x"$have_a52" = "xyes")
dnl ---------------------------------------------
dnl External version of libmad
dnl ---------------------------------------------
+AC_ARG_ENABLE(mad, AC_HELP_STRING([--disable-mad], [Disable support for MAD decoding library (default: enabled)]),
+ [enable_libmad="$enableval"], [enable_libmad="yes"])
AC_ARG_WITH(external-libmad, AC_HELP_STRING([--with-external-libmad], [use external libmad library (not recommended)]),
[external_libmad="$withval"], [external_libmad="no"])
have_mad="no"
-if test x"$external_libmad" = "xyes"; then
+
+if test "x$enable_libmad" = "xno"; then
+ AC_MSG_RESULT([libmad support disabled])
+elif test x"$external_libmad" = "xyes"; then
PKG_CHECK_MODULES(LIBMAD, [mad], have_mad=yes, have_mad=no)
AC_CHECK_HEADERS([mad.h])
AC_SUBST(LIBMAD_LIBS)
@@ -1197,6 +1207,7 @@ else
AC_MSG_RESULT([Use included libmad support])
fi
+AM_CONDITIONAL(MAD, test "x$enable_libmad" = "xyes")
AM_CONDITIONAL(EXTERNAL_LIBMAD, test x"$have_mad" = "xyes")
dnl ---------------------------------------------
@@ -1731,6 +1742,33 @@ AC_ARG_ENABLE(faad, AC_HELP_STRING([--disable-faad], [do not build FAAD decoder]
enable_faad=$enableval, enable_faad=yes)
AM_CONDITIONAL(BUILD_FAAD, test x"$enable_faad" = "xyes")
+dnl ---------------------------------------------
+dnl Optional and external libdts
+dnl ---------------------------------------------
+
+AC_ARG_ENABLE(dts, AC_HELP_STRING([--disable-dts], [Disable support for DTS decoding library (default: enabled)]),
+ [enable_libdts="$enableval"], [enable_libdts="yes"])
+AC_ARG_WITH(external-libdts, AC_HELP_STRING([--with-external-libdts], [use external libdts library (not recommended)]),
+ [external_libdts="$withval"], [external_libdts="no"])
+
+have_dts="no"
+
+if test "x$enable_libdts" = "xno"; then
+ AC_MSG_RESULT([libdts support disabled])
+elif test x"$external_libdts" = "xyes"; then
+ PKG_CHECK_MODULES(LIBDTS, [libdts], have_dts=yes, have_dts=no)
+ AC_CHECK_HEADERS([dts.h])
+ AC_SUBST(LIBDTS_LIBS)
+ AC_SUBST(LIBDTS_CFLAGS)
+ if test "x$have_dts" = "xno"; then
+ AC_MSG_RESULT([*** no usable version of libdts found, using internal copy ***])
+ fi
+else
+ AC_MSG_RESULT([Use included libdts support])
+fi
+
+AM_CONDITIONAL(DTS, test "x$enable_libdts" = "xyes")
+AM_CONDITIONAL(EXTERNAL_LIBDTS, test x"$have_dts" = "xyes")
dnl ---------------------------------------------
dnl libmodplug support
@@ -2674,10 +2712,12 @@ fi
if test x"$have_modplug" = x"yes"; then
echo " - mod"
fi
-if test x"$have_a52" = x"yes"; then
- echo " - ac3 (external library)"
-else
- echo " - ac3 (internal library)"
+if test x"$enable_a52dec" = "xyes"; then
+ if test x"$have_a52" = "xyes"; then
+ echo " - ac3 (external library)"
+ else
+ echo " - ac3 (internal library)"
+ fi
fi
echo ""
@@ -2723,8 +2763,7 @@ echo ""
dnl audio decoders
echo " * audio decoder plugins:"
-echo " - A52/ra-dnet - DTS"
-echo " - MAD (MPG 1/2/3) - GSM 06.10"
+echo " - GSM 06.10"
echo " - linear PCM - Nosefart (NSF)"
if test x"$external_ffmpeg_found" = "xyes"; then
echo " - ffmpeg (external library):"
@@ -2752,6 +2791,27 @@ fi
if test x"$enable_faad" = "xyes"; then
echo " - faad"
fi
+if test x"$enable_libmad" = "xyes"; then
+ if test x"$have_mad" = "xyes"; then
+ echo " - MAD (MPG 1/2/3) (external library)"
+ else
+ echo " - MAD (MPG 1/2/3) (internal library)"
+ fi
+fi
+if test x"$enable_libdts" = "xyes"; then
+ if test x"$have_dts" = "xyes"; then
+ echo " - DTS (external library)"
+ else
+ echo " - DTS (internal library)"
+ fi
+fi
+if test x"$enable_a52dec" = "xyes"; then
+ if test x"$have_a52" = "xyes"; then
+ echo " - A52/ra-dnet (external library)"
+ else
+ echo " - A52/ra-dnet (internal library)"
+ fi
+fi
echo ""
dnl spu decoders
diff --git a/src/liba52/Makefile.am b/src/liba52/Makefile.am
index d786ab250..1cb30459b 100644
--- a/src/liba52/Makefile.am
+++ b/src/liba52/Makefile.am
@@ -2,7 +2,11 @@ include $(top_srcdir)/misc/Makefile.common
libdir = $(XINE_PLUGINDIR)
-lib_LTLIBRARIES = xineplug_decode_a52.la
+if A52
+a52_module = xineplug_decode_a52.la
+endif
+
+lib_LTLIBRARIES = $(a52_module)
if EXTERNAL_A52DEC
internal_sources =
diff --git a/src/libdts/Makefile.am b/src/libdts/Makefile.am
index 52e3ff683..34980c82c 100644
--- a/src/libdts/Makefile.am
+++ b/src/libdts/Makefile.am
@@ -2,11 +2,27 @@ include $(top_srcdir)/misc/Makefile.common
libdir = $(XINE_PLUGINDIR)
-lib_LTLIBRARIES = xineplug_decode_dts.la
+if DTS
+dts_module = xineplug_decode_dts.la
+endif
-xineplug_decode_dts_la_SOURCES = bitstream.c downmix.c parse.c xine_decoder.c
-xineplug_decode_dts_la_LIBADD = $(XINE_LIB)
+lib_LTLIBRARIES = $(dts_module)
+
+if EXTERNAL_LIBDTS
+internal_sources =
+else
+internal_sources = bitstream.c downmix.c parse.c
+endif
+
+xineplug_decode_dts_la_SOURCES = xine_decoder.c $(internal_sources)
xineplug_decode_dts_la_LDFLAGS = -avoid-version -module $(XINE_PLUGIN_MIN_SYMS)
+if EXTERNAL_LIBDTS
+xineplug_decode_dts_la_LIBADD = $(XINE_LIB) $(LIBDTS_LIBS)
+xineplug_decode_dts_la_CFLAGS = $(LIBDTS_CFLAGS)
+else
+xineplug_decode_dts_la_LIBADD = $(XINE_LIB)
+endif
+
noinst_HEADERS = bitstream.h dts.h dts_internal.h tables.h tables_adpcm.h \
tables_fir.h tables_huffman.h tables_quantization.h tables_vq.h
diff --git a/src/libffmpeg/audio_decoder.c b/src/libffmpeg/audio_decoder.c
index f341c6ccb..d40a39e6c 100644
--- a/src/libffmpeg/audio_decoder.c
+++ b/src/libffmpeg/audio_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: audio_decoder.c,v 1.16 2005/05/29 19:28:00 jstembridge Exp $
+ * $Id: audio_decoder.c,v 1.17 2005/09/12 01:06:58 miguelfreitas Exp $
*
* xine audio decoder plugin using ffmpeg
*
@@ -441,7 +441,7 @@ static uint32_t supported_audio_types[] = {
BUF_AUDIO_FLAC,
BUF_AUDIO_ALAC,
BUF_AUDIO_SHORTEN,
- /* BUF_AUDIO_MPEG, */
+ BUF_AUDIO_MPEG,
0
};
diff --git a/src/libmad/Makefile.am b/src/libmad/Makefile.am
index cf34f36f5..b8568f936 100644
--- a/src/libmad/Makefile.am
+++ b/src/libmad/Makefile.am
@@ -6,7 +6,11 @@ EXTRA_DIST = imdct_l_arm.S
libdir = $(XINE_PLUGINDIR)
-lib_LTLIBRARIES = xineplug_decode_mad.la
+if MAD
+mad_module = xineplug_decode_mad.la
+endif
+
+lib_LTLIBRARIES = $(mad_module)
if EXTERNAL_LIBMAD
internal_sources =