mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-12 13:44:56 +02:00
mad: clean up build rules
This commit is contained in:
parent
908ae0741c
commit
ac5caa2c88
47
configure.ac
47
configure.ac
@ -2199,29 +2199,40 @@ fi
|
|||||||
dnl
|
dnl
|
||||||
dnl mad plugin
|
dnl mad plugin
|
||||||
dnl
|
dnl
|
||||||
|
have_mad="no"
|
||||||
|
MAD_CFLAGS=""
|
||||||
|
MAD_LIBS=""
|
||||||
|
|
||||||
|
AC_ARG_WITH(mad, [ --with-mad=PATH path to libmad], [
|
||||||
|
enable_mad="yes"
|
||||||
|
], [
|
||||||
|
with_mad="no"
|
||||||
|
])
|
||||||
|
AS_IF([test "${with_mad}" != "no"], [
|
||||||
|
MAD_CFLAGS="-I${with_mad}/include"
|
||||||
|
MAD_LIBS="-L${with_mad}/lib"
|
||||||
|
])
|
||||||
|
|
||||||
AC_ARG_ENABLE(mad,
|
AC_ARG_ENABLE(mad,
|
||||||
[ --enable-mad libmad module (default enabled)])
|
[ --enable-mad libmad module (default enabled)])
|
||||||
if test "${enable_mad}" != "no"
|
AS_IF([test "${enable_mad}" != "no"], [
|
||||||
then
|
|
||||||
AC_ARG_WITH(mad,
|
|
||||||
[ --with-mad=PATH path to libmad],[],[])
|
|
||||||
if test "${with_mad}" != "no" -a -n "${with_mad}"
|
|
||||||
then
|
|
||||||
VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
|
|
||||||
VLC_ADD_LIBS([mpgatofixed32],[-L${with_mad}/lib])
|
|
||||||
fi
|
|
||||||
|
|
||||||
VLC_SAVE_FLAGS
|
VLC_SAVE_FLAGS
|
||||||
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_mpgatofixed32}"
|
CPPFLAGS="${CPPFLAGS} ${MAD_CFLAGS}"
|
||||||
LDFLAGS="${LDFLAGS} ${LIBS_mpgatofixed32}"
|
LDFLAGS="${LDFLAGS} ${MAD_LIBS}"
|
||||||
AC_CHECK_HEADERS(mad.h, ,
|
AC_CHECK_HEADERS(mad.h, [
|
||||||
[ AC_MSG_ERROR([Could not find libmad on your system: you may get it from http://www.underbit.com/products/mad/. Alternatively you can use --disable-mad to disable the mad plugin.]) ])
|
|
||||||
AC_CHECK_LIB(mad, mad_bit_init, [
|
AC_CHECK_LIB(mad, mad_bit_init, [
|
||||||
VLC_ADD_PLUGIN([mpgatofixed32])
|
have_mad="yes"
|
||||||
VLC_ADD_LIBS([mpgatofixed32],[-lmad])],
|
MAD_LIBS="${MAD_LIBS} -lmad"
|
||||||
[ AC_MSG_ERROR([Cannot find libmad library...]) ])
|
])
|
||||||
|
])
|
||||||
VLC_RESTORE_FLAGS
|
VLC_RESTORE_FLAGS
|
||||||
fi
|
AS_IF([test -n "$enable_mad" -a "${have_mad}" = "no"], [
|
||||||
|
AC_MSG_ERROR([Could not find libmad. Install it or pass --disable-mad to disable it.])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
AC_SUBST(MAD_CFLAGS)
|
||||||
|
AC_SUBST(MAD_LIBS)
|
||||||
|
AM_CONDITIONAL([HAVE_MAD], [test "${have_mad}" = "yes"])
|
||||||
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(merge-ffmpeg,
|
AC_ARG_ENABLE(merge-ffmpeg,
|
||||||
|
@ -202,6 +202,7 @@ $Id$
|
|||||||
* lua: Lua scripting inteface
|
* lua: Lua scripting inteface
|
||||||
* macosx: Video output, and interface module for Mac OS X
|
* macosx: Video output, and interface module for Mac OS X
|
||||||
* macosx_dialog_provider: Minimal Dialog Provider for Mac OS X
|
* macosx_dialog_provider: Minimal Dialog Provider for Mac OS X
|
||||||
|
* mad: MPEG-1 & 2 audio layer I,II,III audio decoder using MAD
|
||||||
* magnify: zoom video filter
|
* magnify: zoom video filter
|
||||||
* marq: Overlays a marquee on the video
|
* marq: Overlays a marquee on the video
|
||||||
* mediacodec: Android Jelly Bean MediaCodec decoder module
|
* mediacodec: Android Jelly Bean MediaCodec decoder module
|
||||||
@ -224,7 +225,6 @@ $Id$
|
|||||||
* mp4: MP4 file input module
|
* mp4: MP4 file input module
|
||||||
* mpc: Musepack decoder
|
* mpc: Musepack decoder
|
||||||
* mpeg_audio: MPEG audio parser/packetizer
|
* mpeg_audio: MPEG audio parser/packetizer
|
||||||
* mpgatofixed32: MPEG-1 & 2 audio layer I,II,III audio decoder using MAD
|
|
||||||
* mpgv: MPEG-I/II Video demuxer
|
* mpgv: MPEG-I/II Video demuxer
|
||||||
* mtp: MTP interface module
|
* mtp: MTP interface module
|
||||||
* mux_asf: ASF muxer
|
* mux_asf: ASF muxer
|
||||||
|
@ -50,7 +50,14 @@ SOURCES_a52tospdif = converter/a52tospdif.c
|
|||||||
SOURCES_a52tofloat32 = converter/a52tofloat32.c
|
SOURCES_a52tofloat32 = converter/a52tofloat32.c
|
||||||
SOURCES_dtstospdif = converter/dtstospdif.c
|
SOURCES_dtstospdif = converter/dtstospdif.c
|
||||||
SOURCES_dtstofloat32 = converter/dtstofloat32.c
|
SOURCES_dtstofloat32 = converter/dtstofloat32.c
|
||||||
SOURCES_mpgatofixed32 = converter/mpgatofixed32.c
|
|
||||||
|
libmad_plugin_la_SOURCES = converter/mpgatofixed32.c
|
||||||
|
libmad_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(MAD_CFLAGS)
|
||||||
|
libmad_plugin_la_LIBADD = $(AM_LIBADD) $(MAD_LIBS)
|
||||||
|
if HAVE_MAD
|
||||||
|
audio_filter_LTLIBRARIES += libmad_plugin.la
|
||||||
|
endif
|
||||||
|
|
||||||
libaudio_format_plugin_la_SOURCES = converter/format.c
|
libaudio_format_plugin_la_SOURCES = converter/format.c
|
||||||
libaudio_format_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
|
libaudio_format_plugin_la_CPPFLAGS = $(AM_CPPFLAGS)
|
||||||
libaudio_format_plugin_la_LIBADD = $(LIBM)
|
libaudio_format_plugin_la_LIBADD = $(LIBM)
|
||||||
|
@ -161,7 +161,7 @@ static int Open( vlc_object_t *p_this )
|
|||||||
static int OpenDecoder( vlc_object_t *p_this )
|
static int OpenDecoder( vlc_object_t *p_this )
|
||||||
{
|
{
|
||||||
/* HACK: Don't use this codec if we don't have an mpga audio filter */
|
/* HACK: Don't use this codec if we don't have an mpga audio filter */
|
||||||
if( !module_exists( "mpgatofixed32" ) )
|
if( !module_exists( "mad" ) )
|
||||||
return VLC_EGENERIC;
|
return VLC_EGENERIC;
|
||||||
|
|
||||||
return Open( p_this );
|
return Open( p_this );
|
||||||
|
Loading…
Reference in New Issue
Block a user