]> git.sesse.net Git - vlc/blobdiff - configure.ac
Qt: hide live555 module options when disabled
[vlc] / configure.ac
index 6627c2a0a70b94428f0012cf477fcc91a22f6c66..8e092bd9afe7989296e6c1861116684912bba48b 100644 (file)
@@ -1394,7 +1394,7 @@ dnl  Check for fully workin SSE2 intrinsics
 dnl  We need support for -mmmx, we need <emmintrin.h>, and we also need a
 dnl  working compiler (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23963)
 AC_ARG_ENABLE(sse,
-[  --disable-sse           disable SSE (1 and 2) optimizations (default auto)]
+[  --disable-sse           disable SSE (1, 2, 3 and 4) optimizations (default auto)]
 ,, [
   case "${host_cpu}" in
     i686|x86_64)
@@ -1453,22 +1453,8 @@ AS_IF([test "${enable_sse}" != "no"], [
     VLC_ADD_PLUGIN([i420_yuy2_sse2])
     VLC_ADD_PLUGIN([i422_yuy2_sse2])
   ])
-])
-
-AC_ARG_ENABLE(ssse3,
-[  --disable-sse3          disable SSE3/SSSE3 optimizations (default auto)]
-,, [
-  case "${host_cpu}" in
-    i686|x86_64)
-      enable_sse3=yes
-      ;;
-    *)
-      enable_sse3=no
-      ;;
-  esac
-])
-AS_IF([test "${enable_sse3}" != "no"], [
 
+  # SSE3
   AC_CACHE_CHECK([if $CC groks SSE3 inline assembly],
     [ac_cv_sse3_inline],
     [CFLAGS="${CFLAGS_save} -O -msse3"
@@ -1478,10 +1464,8 @@ AS_IF([test "${enable_sse3}" != "no"], [
   ])
   AS_IF([test "${ac_cv_sse3_inline}" != "no"], [
     AC_DEFINE(CAN_COMPILE_SSE3, 1,
-              [Define to 1 if SSE3 inline assembly is available.])
-    ]
-    )
-
+              [Define to 1 if SSE3 inline assembly is available.]) ])
+  # SSSE3
   AC_CACHE_CHECK([if $CC groks SSSE3 inline assembly],
     [ac_cv_ssse3_inline],
     [CFLAGS="${CFLAGS_save} -O -mssse3"
@@ -1492,9 +1476,19 @@ AS_IF([test "${enable_sse3}" != "no"], [
 
   AS_IF([test "${ac_cv_ssse3_inline}" != "no"], [
     AC_DEFINE(CAN_COMPILE_SSSE3, 1,
-              [Define to 1 if SSSE3 inline assembly is available.])
-    ]
-    )
+              [Define to 1 if SSSE3 inline assembly is available.]) ])
+
+  # SSE4
+  AC_CACHE_CHECK([if $CC groks SSE4 inline assembly],
+    [ac_cv_sse4_inline],
+    [CFLAGS="${CFLAGS_save} -O -msse4"
+     AC_TRY_COMPILE(,[void *p;asm volatile("pmaxsb %%xmm1,%%xmm0"::"r"(p));],
+                    ac_cv_sse4_inline=yes, ac_cv_sse4_inline=no)
+     ARCH="${ARCH} sse4"
+  ])
+  AS_IF([test "${ac_cv_sse4_inline}" != "no"], [
+    AC_DEFINE(CAN_COMPILE_SSE4, 1,
+              [Define to 1 if SSE4 inline assembly is available.]) ])
 ])
 
 AC_CACHE_CHECK([if $CC groks 3D Now! inline assembly],
@@ -2305,7 +2299,16 @@ then
       then
         AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
       fi
-    ])
+    ],
+    [#if defined( HAVE_STDINT_H )
+#   include <stdint.h>
+#elif defined( HAVE_INTTYPES_H )
+#   include <inttypes.h>
+#endif
+#include <dvbpsi/dvbpsi.h>
+#include <dvbpsi/descriptor.h>
+#include <dvbpsi/pat.h>
+#include <dvbpsi/pmt.h>])
     CPPFLAGS="${CPPFLAGS_save}"
   ;;
   esac
@@ -3360,7 +3363,7 @@ if test "${enable_x264}" != "no"; then
       AC_MSG_ERROR([the specified tree doesn't have x264.h])
     fi
   else
-      PKG_CHECK_MODULES(X264,x264, [
+      PKG_CHECK_MODULES(X264,x264 >= 0.76, [
         VLC_ADD_PLUGIN([x264])
         VLC_ADD_LDFLAGS([x264],[${X264_LIBS}])
 
@@ -3380,7 +3383,7 @@ if test "${enable_x264}" != "no"; then
         fi
       ],[
         if test "${enable_x264}" = "yes"; then
-            AC_MSG_ERROR([Could not find libx264 on your system: you may get it from http://www.videolan.org/x264.html])
+            AC_MSG_ERROR([Could not find libx264 >= 0.76 on your system: you may get it from http://www.videolan.org/x264.html])
           fi
       ])
     LDFLAGS="${LDFLAGS_save}"
@@ -3590,9 +3593,13 @@ AC_ARG_ENABLE(xvmc,
 ])
 AS_IF([test "${enable_xvmc}" != "no"], [
   AC_CHECK_HEADERS(X11/extensions/vldXvMC.h, [
-    VLC_ADD_PLUGIN([xvmc])
-    VLC_ADD_LIBS([xvmc],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXvMCW -lXv ${LIBMPEG2_LIBS}])
-    VLC_ADD_CPPFLAGS([xvmc],[${X_CFLAGS} ${LIBMPEG2_CFLAGS}])
+    AS_IF([test "${enable_libmpeg2}" = "yes"], [
+      VLC_ADD_PLUGIN([xvmc])
+      VLC_ADD_LIBS([xvmc],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXvMCW -lXv ${LIBMPEG2_LIBS}])
+      VLC_ADD_CPPFLAGS([xvmc],[${X_CFLAGS} ${LIBMPEG2_CFLAGS}])
+    ], [
+      AC_MSG_ERROR([XVideo-MotionCompensation needs libmpeg2 which isn't available])
+    ])
   ], [
     AC_MSG_ERROR([XVideo-MotionCompensation extension not found!])
   ])