]> git.sesse.net Git - vlc/blobdiff - configure.ac
* Re apply the revert from [12159]. ffmpeg pkg-config has been fixed. closes #306
[vlc] / configure.ac
index 137f4a891efa07c5e7a0d2d5b95850fc10303fe1..cbf546e4bc8b9827f9c534d32551b12d752dc944 100644 (file)
@@ -228,7 +228,7 @@ AM_CONDITIONAL(HAVE_WINCE, test "${SYS}" = "mingwce")
 dnl
 dnl Gettext stuff
 dnl
-ALL_LINGUAS="ca da de en_GB es fr it ja ko nl pt_BR ro ru tr zh_TW"
+ALL_LINGUAS="ca da de en_GB es fr it ja ko nl pt_BR ro ru tr zh_CN zh_TW"
 AM_GNU_GETTEXT_VERSION(0.11.5)
 AM_GNU_GETTEXT
 if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
@@ -475,7 +475,7 @@ AC_CHECK_LIB(m,cos,[
   VLC_ADD_LDFLAGS([adjust distort a52tofloat32 dtstofloat32 x264 goom],[-lm])
 ])
 AC_CHECK_LIB(m,pow,[
-  VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer vlc freetype],[-lm])
+  VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer vlc freetype mpc],[-lm])
 ])
 AC_CHECK_LIB(m,sqrt,[
   VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex],[-lm])
@@ -1989,11 +1989,11 @@ AC_ARG_ENABLE(mkv,
 if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
   AC_LANG_PUSH(C++)
   AC_CHECK_HEADERS(ebml/EbmlVersion.h, [
-    AC_MSG_CHECKING(for libebml version >= 0.7.3)
+    AC_MSG_CHECKING(for libebml version >= 0.7.6)
     AC_EGREP_CPP(yes,
       [#include <ebml/EbmlVersion.h>
        #ifdef LIBEBML_VERSION
-       #if LIBEBML_VERSION >= 0x000703
+       #if LIBEBML_VERSION >= 0x000706
        yes
        #endif
        #endif],
@@ -2050,6 +2050,19 @@ then
     VLC_ADD_LDFLAGS([mod],[-lmodplug])])
 fi
 
+dnl
+dnl  mpc demux plugin
+dnl
+AC_ARG_ENABLE(mpc,
+  [  --enable-mpc            Mpc demux support (default enabled)])
+if test "${enable_mpc}" != "no"
+then
+  AC_CHECK_HEADERS(mpcdec/mpcdec.h, [
+    VLC_ADD_PLUGINS([mpc])
+    VLC_ADD_LDFLAGS([mpc],[-lmpcdec])])
+fi
+
+
 dnl
 dnl  Codec plugins
 dnl
@@ -2125,6 +2138,9 @@ AC_CHECK_HEADERS(id3tag.h, [
 dnl
 dnl  ffmpeg decoder/demuxer plugin
 dnl
+dnl we try to find ffmpeg using : 1- ffmpeg-config, 2- pkg-config
+dnl                            3- default place, 4- given tree
+
 AC_ARG_ENABLE(ffmpeg,
 [  --enable-ffmpeg         ffmpeg codec (default enabled)])
 if test "${enable_ffmpeg}" != "no"
@@ -2151,29 +2167,20 @@ dnl Look for a ffmpeg-config (we are on debian )
      VLC_ADD_LDFLAGS([ffmpeg stream_out_switcher],[`${FFMPEG_CONFIG} --plugin-libs avcodec avformat postproc`])
   
   else
-    AC_ARG_WITH(ffmpeg-mp3lame,
-      [    --with-ffmpeg-mp3lame specify if ffmpeg has been compiled with mp3lame support],
-      [
-        VLC_ADD_LDFLAGS([ffmpeg],[-lmp3lame]) ])
-
-    AC_ARG_WITH(ffmpeg-faac,
-      [    --with-ffmpeg-faac    specify if ffmpeg has been compiled with faac support],
-      [
-        VLC_ADD_LDFLAGS([ffmpeg],[-lfaac]) ])
-
-    AC_ARG_WITH(ffmpeg-dts,
-      [    --with-ffmpeg-dts     specify if ffmpeg has been compiled with dts support],
-      [
-        VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
-
-    AC_ARG_WITH(ffmpeg-zlib,
-      [    --with-ffmpeg-zlib    specify if ffmpeg has been compiled with zlib support],
-      [
-        VLC_ADD_LDFLAGS([ffmpeg],[-lz]) ])
-
-    AC_ARG_WITH(ffmpeg-tree,
-      [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
+dnl Trying with pkg-config
+   PKG_CHECK_MODULES(FFMPEG,libavcodec libavformat,
+    [
+     AC_CHECK_HEADERS(ffmpeg/avcodec.h)
+     AC_CHECK_HEADERS(postproc/postprocess.h)
+     VLC_ADD_BUILTINS([ffmpeg])
+     if test "${enable_sout}" != "no"; then
+         VLC_ADD_BUILTINS([stream_out_switcher])
+     fi
+     VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_CFLAGS}])
+     VLC_ADD_LDFLAGS([ffmpeg],[${FFMPEG_LIBS}])
 
+    ],[
+     
     dnl
     dnl test for !(--with-ffmpeg-tree)
     dnl
@@ -2275,6 +2282,31 @@ dnl Look for a ffmpeg-config (we are on debian )
         VLC_ADD_CPPFLAGS([ffmpeg stream_out_switcher],[-I${real_ffmpeg_tree}/libavformat])
       fi
     fi
+    ])
+
+    AC_ARG_WITH(ffmpeg-mp3lame,
+      [    --with-ffmpeg-mp3lame specify if ffmpeg has been compiled with mp3lame support],
+      [
+        VLC_ADD_LDFLAGS([ffmpeg],[-lmp3lame]) ])
+
+    AC_ARG_WITH(ffmpeg-faac,
+      [    --with-ffmpeg-faac    specify if ffmpeg has been compiled with faac support],
+      [
+        VLC_ADD_LDFLAGS([ffmpeg],[-lfaac]) ])
+
+    AC_ARG_WITH(ffmpeg-dts,
+      [    --with-ffmpeg-dts     specify if ffmpeg has been compiled with dts support],
+      [
+        VLC_ADD_LDFLAGS([ffmpeg],[-ldts]) ])
+
+    AC_ARG_WITH(ffmpeg-zlib,
+      [    --with-ffmpeg-zlib    specify if ffmpeg has been compiled with zlib support],
+      [
+        VLC_ADD_LDFLAGS([ffmpeg],[-lz]) ])
+
+    AC_ARG_WITH(ffmpeg-tree,
+      [    --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
+
   fi
 fi
 
@@ -3863,9 +3895,9 @@ then
   AC_PATH_PROG(WX_CONFIG, ${WXWIDGETS_NAME}, no, ${WXWIDGETS_PATH})
   if test "${WX_CONFIG}" != "no" -a "${CXX}" != ""
   then
-    if expr 2.6.0 \> `${WX_CONFIG} --version` >/dev/null
+    if expr 2.3.0 \> `${WX_CONFIG} --version` >/dev/null
     then
-      AC_MSG_ERROR([Your development package for wxWidgets is too old, you need at least version 2.6.0. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.])
+      AC_MSG_ERROR([Your development package for wxWidgets is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.])
     fi
     AC_LANG_PUSH(C++)
     # Turn this error: