]> git.sesse.net Git - vlc/blobdiff - configure.ac
Qt: Fix the bug where the volume was losing 1% at each start
[vlc] / configure.ac
index fda8da1d79f96d08edae1276c0ee11da7f49b6a4..623f9833ff84f04ab807b21750bbd532d7323403 100644 (file)
@@ -358,7 +358,7 @@ case "${host_os}" in
     fi
     if test "${SYS}" = "mingwce"; then
         # add ws2 for closesocket, select, recv
-        VLC_ADD_LIBS([libvlccore access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_rtmp sap http netsync audioscrobbler growl rtp stream_out_rtp remoteosd],[-lws2])
+        VLC_ADD_LIBS([libvlccore access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_rtmp sap http netsync audioscrobbler growl rtp stream_out_rtp remoteosd ts],[-lws2])
         VLC_ADD_LIBS([libvlccore],[-lmmtimer])
    fi
     ;;
@@ -2736,7 +2736,60 @@ fi
 dnl
 dnl  mad plugin
 dnl
-PKG_ENABLE_MODULES_VLC([mad], [mpgatofixed32], [mad], [MPEG Audio Decoder], [auto])
+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
 
 dnl
 dnl   libid3tag support (FIXME!!! doesn't work with new input)
@@ -3462,68 +3515,6 @@ AS_IF([test "${enable_xvmc}" != "no"], [
   ])
 ])
 
-dnl
-dnl  Check for the Xinerama extension
-dnl
-AC_ARG_ENABLE(xinerama,
-  [  --enable-xinerama       Xinerama support (default enabled)],, [
-  enable_xinerama="$enable_xvideo"
-])
-AS_IF([test "$enable_xinerama" != "no"], [
-  ac_cv_have_xinerama="no"
-  CFLAGS="${CFLAGS_save} ${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext"
-  AC_CHECK_HEADERS(X11/extensions/Xinerama.h,[
-    AC_CHECK_LIB(Xinerama_pic, XineramaQueryExtension,[
-      VLC_ADD_LIBS([xvideo],[-lXinerama_pic])
-      VLC_ADD_LIBS([x11],[-lXinerama_pic])
-      VLC_ADD_LIBS([glx],[-lXinerama_pic])
-      VLC_ADD_LIBS([xvmc],[-lXinerama_pic])
-      ac_cv_have_xinerama="yes"
-    ],[
-      AC_CHECK_LIB(Xinerama, XineramaQueryExtension,[
-        VLC_ADD_LIBS([xvideo],[-lXinerama])
-        VLC_ADD_LIBS([x11],[-lXinerama])
-        VLC_ADD_LIBS([glx],[-lXinerama])
-        VLC_ADD_LIBS([xvmc],[-lXinerama])
-        ac_cv_have_xinerama="yes"
-      ])
-    ])
-  ])
-  if test "${ac_cv_have_xinerama}" = "yes"; then
-    AC_DEFINE(HAVE_XINERAMA, 1, [Define this if you have libXinerama installed])
-  fi
-
-dnl
-dnl  Check for XF86VidMode extension
-dnl
-  ac_cv_have_xf86vidmode="no"
-  AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,[
-    AC_CHECK_LIB(Xxf86vm_pic, XF86VidModeGetViewPort,[
-      VLC_ADD_LIBS([xvideo],[-lXxf86vm_pic])
-      VLC_ADD_LIBS([x11],[-lXxf86vm_pic])
-      VLC_ADD_LIBS([glx],[-lXxf86vm_pic])
-      VLC_ADD_LIBS([xvmc],[-lXxf86vm_pic])
-      ac_cv_have_xf86vidmode="yes"
-    ],[
-      AC_CHECK_LIB(Xxf86vm, XF86VidModeGetViewPort,[
-        VLC_ADD_LIBS([xvideo],[-lXxf86vm])
-        VLC_ADD_LIBS([x11],[-lXxf86vm])
-        VLC_ADD_LIBS([glx],[-lXxf86vm])
-        VLC_ADD_LIBS([xvmc],[-lXxf86vm])
-        ac_cv_have_xf86vidmode="yes"
-      ])
-    ])
-  ],[true],
-[#ifdef HAVE_X11_XLIB_H
-# include <X11/Xlib.h>
-#endif]
-   )
-  AS_IF([test "${ac_cv_have_xf86vidmode}" = "yes"],
-    [AC_DEFINE(HAVE_XF86VIDMODE, 1, [Define this if you have libXxf86vm installed])
-  ])
-  CFLAGS="${CFLAGS_save}"
-])
-
 dnl End of Xlib tests
 CPPFLAGS="${CPPFLAGS_save}"
 
@@ -3709,11 +3700,10 @@ then
       VLC_ADD_PLUGIN([freetype])
       have_freetype=yes
       VLC_ADD_CPPFLAGS([freetype skins2],[${FREETYPE_CFLAGS}])
-      VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
       if test "${SYS}" = "mingw32"; then
-        VLC_ADD_LIBS([skins2],[-lxml2])
-        VLC_ADD_LIBS([freetype],[-liconv])
+        VLC_ADD_LIBS([freetype],[-liconv -lz])
       fi
+      VLC_ADD_LIBS([freetype skins2],[${FREETYPE_LIBS}])
       if test "${enable_fontconfig}" != "no"
       then
         AC_CHECK_HEADERS(fontconfig/fontconfig.h,
@@ -3722,6 +3712,16 @@ then
         AC_CHECK_HEADERS(Carbon/Carbon.h,
           [VLC_ADD_LDFLAGS([freetype],[-Wl,-framework,Carbon])])
       fi
+
+     dnl fribidi support
+      if test "${enable_fribidi}" != "no"
+      then
+        PKG_CHECK_MODULES(FRIBIDI, fribidi, [
+          VLC_ADD_CPPFLAGS([freetype skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
+          VLC_ADD_LIBS([freetype skins2], [${FRIBIDI_LIBS}])
+        ])
+      fi
+
   ],[
   have_freetype=no
   AS_IF([ test "${enable_freetype}" =  "yes"],[
@@ -3731,14 +3731,6 @@ from http://www.freetype.org/, or configure with --disable-freetype. Have a nice
     ])
   ])
 
-  dnl fribidi support
-  if test "${enable_fribidi}" != "no"
-  then
-    PKG_CHECK_MODULES(FRIBIDI, fribidi, [
-      VLC_ADD_CPPFLAGS([freetype skins2], [${FRIBIDI_CFLAGS} -DHAVE_FRIBIDI])
-      VLC_ADD_LIBS([freetype skins2], [${FRIBIDI_LIBS}])
-    ])
-    fi
 fi
 
 dnl