[vlc-devel] [PATCH 4/4] Simplified libmad configuration
Maxim Bublis
b at codemonkey.ru
Thu Nov 7 11:47:53 CET 2013
---
configure.ac | 57 +--------------------------------------------------------
1 file changed, 1 insertion(+), 56 deletions(-)
diff --git a/configure.ac b/configure.ac
index 59352b8..91d033c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2159,62 +2159,7 @@ fi
dnl
dnl mad plugin
dnl
-AC_ARG_ENABLE(mad,
- [ --enable-mad libmad module (default enabled)])
-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
-
- AC_ARG_WITH(mad-tree,
- [ --with-mad-tree=PATH mad tree for static linking],[],[])
- if test "${with_mad_tree}" != "no" -a -n "${with_mad_tree}"
- then
- real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
- if test -z "${real_mad_tree}"
- then
- dnl The given directory can't be found
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([${with_mad_tree} directory does not exist])
- fi
- dnl Use a custom libmad
- AC_MSG_CHECKING(for mad.h in ${real_mad_tree})
- if test -f ${real_mad_tree}/mad.h
- then
- AC_MSG_RESULT(yes)
- VLC_ADD_CPPFLAGS([mpgatofixed32],[-I${real_mad_tree}])
- VLC_ADD_LIBS([mpgatofixed32],[-L${real_mad_tree}/.libs])
- VLC_SAVE_FLAGS
- LDFLAGS="${LDFLAGS} ${LIBS_mpgatofixed32}"
- AC_CHECK_LIB(mad, mad_bit_init, [
- VLC_ADD_PLUGIN([mpgatofixed32])
- VLC_ADD_LIBS([mpgatofixed32],[-lmad])
- ],[ AC_MSG_ERROR([the specified tree has not been compiled ])
- ],[])
- VLC_RESTORE_FLAGS
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([the specified tree does not have mad.h])
- fi
- else
- VLC_SAVE_FLAGS
- CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_mpgatofixed32}"
- LDFLAGS="${LDFLAGS} ${LIBS_mpgatofixed32}"
- 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, [
- VLC_ADD_PLUGIN([mpgatofixed32])
- VLC_ADD_LIBS([mpgatofixed32],[-lmad])],
- [ AC_MSG_ERROR([Cannot find libmad library...]) ])
- VLC_RESTORE_FLAGS
- fi
-fi
-
+PKG_ENABLE_MODULES_VLC([MAD], [mpgatofixed32], [mad], [libmad module], [auto])
AC_ARG_ENABLE(merge-ffmpeg,
[ --enable-merge-ffmpeg merge FFmpeg-based plugins (default disabled)],, [
--
Maxim Bublis
More information about the vlc-devel
mailing list