[vlc-commits] commit: Configure: try to fix modplug detection (Jean-Baptiste Kempf )
git at videolan.org
git at videolan.org
Mon Jul 19 00:48:08 CEST 2010
vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jul 18 19:27:24 2010 +0200| [7a6c7c73ffe59b9156a7b393ea5fdb85ee161fc4] | committer: Jean-Baptiste Kempf
Configure: try to fix modplug detection
If 0.8.8 is detected and --enable-mod is passed, it will error,
if --disable-mod is passed, nothing will happen
else it will autodetect. This is mostly like all other PKG_ENABLE_MODULES_VLC
detections
(cherry picked from commit e043658db0f93148d2a3e499cd90e6fb76ee3fd2)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=7a6c7c73ffe59b9156a7b393ea5fdb85ee161fc4
---
configure.ac | 39 +++++++--------------------------------
1 files changed, 7 insertions(+), 32 deletions(-)
diff --git a/configure.ac b/configure.ac
index 41a35db..4eb3be1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2477,42 +2477,17 @@ dnl
dnl modplug demux plugin
dnl
AC_ARG_ENABLE(mod,
- [ --enable-mod Mod demux support (default enabled)])
-if test "${enable_mod}" != "no"
-then
- AC_ARG_WITH(mod-tree,
- [ --with-mod-tree=PATH mod tree for static linking])
- if test -n "${with_mod_tree}"
- then
- AC_MSG_CHECKING(for libmodplug.a in ${with_mod_tree})
- real_mod_tree="`cd ${with_mod_tree} 2>/dev/null && pwd`"
- if test -z "${real_mod_tree}"
- then
- dnl The given directory can't be found
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([cannot cd to ${with_mod_tree}])
- fi
- if test -f "${real_mod_tree}/src/.libs/libmodplug.a"
- then
- dnl Use a custom mod
- AC_MSG_RESULT(${real_mod_tree}/src/.libs/libmodplug.a)
- VLC_ADD_PLUGIN([mod])
- VLC_ADD_LIBS([mod],[${real_mod_tree}/src/.libs/libmodplug.a -lstdc++])
- VLC_ADD_CXXFLAGS([mod],[-I${real_mod_tree}/include])
- else
- dnl The given mod wasn't built
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([cannot find ${real_mod_tree}/src/.libs/libmodplug.a, make sure you compiled mod in ${with_mod_tree}])
- fi
- else
- PKG_CHECK_MODULES(LIBMODPLUG, [libmodplug >= 0.8 libmodplug != 0.8.8], [
+ [ --enable-mod Mod demux support (default auto)])
+if test "${enable_mod}" != "no" ; then
+ PKG_CHECK_MODULES(LIBMODPLUG, [libmodplug >= 0.8.4 libmodplug != 0.8.8], [
VLC_ADD_PLUGIN([mod])
VLC_ADD_CXXFLAGS([mod],[$LIBMODPLUG_CFLAGS])
VLC_ADD_LIBS([mod],[$LIBMODPLUG_LIBS])
- ], [
- AC_MSG_WARN([libmodplug not found or a broken version (0.8.8.0) was found!])
+ ],[
+ AS_IF([test x"${enable_mod}" = "xyes"],
+ [AC_MSG_ERROR(libmodplug not found or a broken version (0.8.8.0) was found!)],
+ [AC_MSG_WARN(libmodplug not found or a broken version (0.8.8.0) was found!)])
])
- fi
fi
dnl
More information about the vlc-commits
mailing list