[vlc-commits] commit: Configure: try to fix modplug detection (Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Sun Jul 18 19:30:53 CEST 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jul 18 19:27:24 2010 +0200| [e043658db0f93148d2a3e499cd90e6fb76ee3fd2] | 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

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e043658db0f93148d2a3e499cd90e6fb76ee3fd2
---

 configure.ac |   39 +++++++--------------------------------
 1 files changed, 7 insertions(+), 32 deletions(-)

diff --git a/configure.ac b/configure.ac
index ad074db..da7746b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2460,42 +2460,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