]> git.sesse.net Git - vlc/blobdiff - configure.ac
Replace libvlc_exception_get_message with libvlc_errmsg
[vlc] / configure.ac
index fa2c285e80bc0e5d4b618b9023a35ebebb236cf1..1db7bc424ca6cb815ab765c273dd3a3c81e941f0 100644 (file)
@@ -943,12 +943,6 @@ fi
 AM_CONDITIONAL(HAVE_MINIZIP, [ test "${have_minizip}" = "yes" ])
 
 
-dnl Check for hal
-PKG_ENABLE_MODULES_VLC([HAL], [], [hal >= 0.5.0], [Linux HAL services discovery], [auto])
-
-dnl Check for mtp
-PKG_ENABLE_MODULES_VLC([MTP], [], [libmtp >= 0.3.0],[MTP devices support],[auto])
-
 dnl Check for dbus
 AC_ARG_ENABLE(dbus,
   [  --enable-dbus           Linux D-BUS message bus system (default enabled)])
@@ -1674,9 +1668,6 @@ AS_IF([test "${enable_sout}" != "no"], [
 ])
 AM_CONDITIONAL(ENABLE_SOUT, [test "${enable_sout}" != "no"])
 
-dnl Check for libshout
-PKG_ENABLE_MODULES_VLC([shout], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
-
 dnl Lua modules
 AC_ARG_ENABLE(lua,
   AS_HELP_STRING([--enable-lua],[lua playlist, metafetcher and interface
@@ -2565,6 +2556,11 @@ if test "${enable_sout}" != "no"; then
     PKG_ENABLE_MODULES_VLC([MUX_OGG], [], [ogg >= 1.0], [Ogg demux support], [auto])
 fi
 
+if test "${enable_sout}" != "no"; then
+dnl Check for libshout
+PKG_ENABLE_MODULES_VLC([shout], [access_output_shout], [shout >= 2.1], [libshout output plugin], [auto])
+fi
+
 dnl
 dnl  matroska demux plugin
 dnl
@@ -2740,60 +2736,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 doesn't 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])
-      LDFLAGS="${LDFLAGS_save} ${LIBS_mpgatofixed32}"
-      AC_CHECK_LIB(mad, mad_bit_init, [
-        VLC_ADD_PLUGIN([mpgatofixed32])
-        VLC_ADD_LIBS([mpgatofixed32],[-lmad])
-        ],[ AC_MSG_ERROR([the specified tree hasn't been compiled ])
-      ],[])
-      LDFLAGS="${LDFLAGS_save}"
-    else
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([the specified tree doesn't have mad.h])
-    fi
-  else
-    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mpgatofixed32}"
-    LDFLAGS="${LDFLAGS_save} ${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...]) ])
-    CPPFLAGS="${CPPFLAGS_save}"
-    LDFLAGS="${LDFLAGS_save}"
-  fi
-fi
+PKG_ENABLE_MODULES_VLC([mad], [mpgatofixed32], [mad], [MPEG Audio Decoder], [auto])
 
 dnl
 dnl   libid3tag support (FIXME!!! doesn't work with new input)
@@ -2976,48 +2919,7 @@ fi
 dnl
 dnl twolame encoder plugin
 dnl
-AC_ARG_ENABLE(twolame,
-[  --enable-twolame        twolame codec (default disabled)])
-if test "${enable_twolame}" = "yes"
-then
-  AC_ARG_WITH(twolame-tree,
-  [    --with-twolame-tree=PATH twolame tree for static linking])
-  if test -n "${with_twolame_tree}"
-  then
-    AC_MSG_CHECKING(for libtwolame.a in ${with_twolame_tree})
-    real_twolame_tree="`cd ${with_twolame_tree} 2>/dev/null && pwd`"
-    if test -z "${real_twolame_tree}"
-    then
-      dnl  The given directory can't be found
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot cd to ${with_twolame_tree}])
-    fi
-    if test -f "${real_twolame_tree}/libtwolame/.libs/libtwolame.a"
-    then
-      dnl  Use a custom twolame
-      AC_MSG_RESULT(${real_twolame_tree}/libtwolame/.libs/libtwolame.a)
-      VLC_ADD_PLUGIN([twolame])
-      VLC_ADD_LIBS([twolame],[${real_twolame_tree}/libtwolame/.libs/libtwolame.a])
-      VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/libtwolame -DLIBTWOLAME_STATIC])
-    else
-      dnl  The given libtwolame wasn't built
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${real_twolame_tree}/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}])
-    fi
-  else
-    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame} -DLIBTWOLAME_STATIC"
-    LDFLAGS="${LDFLAGS_save} ${LIBS_twolame}"
-    AC_CHECK_HEADERS(twolame.h, ,
-      [ AC_MSG_ERROR([Cannot find development header for libtwolame...]) ])
-    AC_CHECK_LIB(twolame, twolame_init, [
-      VLC_ADD_PLUGIN([twolame])
-      VLC_ADD_CPPFLAGS([twolame],[-DLIBTWOLAME_STATIC])
-      VLC_ADD_LIBS([twolame],[-ltwolame]) ],
-        [ AC_MSG_ERROR([Cannot find libtwolame library...]) ])
-    LDFLAGS="${LDFLAGS_save}"
-    CPPFLAGS="${CPPFLAGS_save}"
-  fi
-fi
+PKG_ENABLE_MODULES_VLC([twolame], [], [twolame], [MPEG Audio Layer 2 encoder], [auto], [], [], [ -DLIBTWOLAME_STATIC])
 
 dnl
 dnl  QuickTime plugin
@@ -3370,7 +3272,7 @@ dnl
 AC_ARG_ENABLE(libass,
   [  --enable-libass         Subtitle support using libass (default disabled)])
 AS_IF( [test "${enable_libass}" = "yes"], [
-  PKG_CHECK_MODULES(LIBASS, libass >= 0.9.5,
+  PKG_CHECK_MODULES(LIBASS, libass >= 0.9.6,
       [
         VLC_ADD_LDFLAGS([libass],[$LIBASS_LIBS])
         VLC_ADD_CFLAGS([libass],[$LIBASS_CFLAGS])
@@ -4173,29 +4075,7 @@ PKG_ENABLE_MODULES_VLC([PORTAUDIO], [], [portaudio-2.0], [Portaudio library supp
 dnl
 dnl  ALSA module
 dnl
-AC_ARG_ENABLE(alsa,
-  [  --enable-alsa           ALSA sound support for Linux (default enabled)])
-if test "${enable_alsa}" != "no"
-then
-  AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
-  if test "${have_alsa}" = "true"
-  then
-    CFLAGS="${CFLAGS_save}"
-    AC_TRY_COMPILE([#define ALSA_PCM_NEW_HW_PARAMS_API
-                    #define ALSA_PCM_NEW_SW_PARAMS_API
-                    #include <alsa/asoundlib.h>],
-       [snd_pcm_hw_params_get_period_time(0,0,0);],
-        AC_DEFINE(HAVE_ALSA_NEW_API, 1, Define if ALSA is at least rc4))
-    VLC_ADD_PLUGIN([alsa])
-    VLC_ADD_LIBS([alsa],[-lasound -lm -ldl])
-    VLC_ADD_PLUGIN([access_alsa])
-    VLC_ADD_LIBS([access_alsa],[-lasound -lm -ldl])
-  else
-    if test "${enable_alsa}" = "yes"; then
-      AC_MSG_ERROR([Could not find ALSA development headers])
-    fi
-  fi
-fi
+PKG_ENABLE_MODULES_VLC([ALSA], [], [alsa >= 1.0.0], [Alsa sound support for linux], [auto])
 
 dnl
 dnl  win32 waveOut plugin
@@ -4674,9 +4554,16 @@ fi
 
 dnl
 dnl  Bonjour services discovery
-dnl
 PKG_ENABLE_MODULES_VLC([BONJOUR], [], [avahi-client >= 0.6], [Bonjour services discovery], [auto])
 
+dnl
+dnl  HAL services discovery
+PKG_ENABLE_MODULES_VLC([HAL], [], [hal >= 0.5.0], [Linux HAL services discovery], [auto])
+
+dnl
+dnl MTP devices services discovery
+PKG_ENABLE_MODULES_VLC([MTP], [], [libmtp >= 0.3.0],[MTP devices support],[auto])
+
 dnl
 dnl  Lirc plugin
 dnl