]> git.sesse.net Git - vlc/blobdiff - configure.ac
opus: update i_buffer when memmoving decoder output
[vlc] / configure.ac
index 63fbe8d6cc791f8b4ebd9517f1a10c1f02e66f6e..59352b8994a6a4e0e7280a78c0906915bc0becb9 100644 (file)
@@ -73,6 +73,7 @@ AM_PROG_AS
 
 AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [Validator for desktop entry files])
 AC_CHECK_PROGS(DESKTOP_FILE_VALIDATE, [${DESKTOP_FILE_VALIDATE} desktop-file-validate], :)
+AC_CHECK_PROGS(YASM, yasm)
 
 dnl Check for compiler properties
 AC_C_CONST
@@ -96,6 +97,18 @@ dnl
 dnl  Check the operating system
 dnl
 HAVE_WIN64="0"
+
+YASMFLAGS=""
+case "${host}" in
+    i?86*)
+    YASMFLAGS="-f elf32"
+        ;;
+    x86_64*)
+    YASMFLAGS="-f elf64"
+        ;;
+esac
+
+
 case "${host_os}" in
   "")
     SYS=unknown
@@ -131,6 +144,7 @@ case "${host_os}" in
     case "${host}" in
       i?86*)
         ARCH_flag="-arch i386"
+        YASMFLAGS="-f macho32"
       ;;
       ppc64*)
         ARCH_flag="-arch ppc64"
@@ -140,6 +154,7 @@ case "${host_os}" in
       ;;
       x86_64*)
         ARCH_flag="-arch x86_64"
+        YASMFLAGS="-f macho64"
       ;;
       arm*)
         ac_cv_c_bigendian="no"
@@ -237,10 +252,12 @@ case "${host_os}" in
                 HAVE_WIN64="1"
                 WINDOWS_ARCH="x64"
                 PROGRAMFILES="PROGRAMFILES64"
+                YASMFLAGS="-f win64"
             ;;
             *)
                 WINDOWS_ARCH="x86"
                 PROGRAMFILES="PROGRAMFILES"
+                YASMFLAGS="-f win32"
             ;;
         esac
         AC_SUBST(WINDOWS_ARCH)
@@ -275,6 +292,8 @@ AM_CONDITIONAL(HAVE_WIN32,   test "${SYS}" = "mingw32")
 AM_CONDITIONAL(HAVE_WIN64,   test "${HAVE_WIN64}" = "1")
 AM_CONDITIONAL(HAVE_SYMBIAN, test "${SYS}" = "symbian")
 
+AC_SUBST(YASMFLAGS)
+
 dnl
 dnl Sadly autoconf does not think about testing foo.exe when ask to test
 dnl for program foo on win32
@@ -1387,53 +1406,18 @@ AS_IF([test "${enable_altivec}" = "yes"], [
     have_altivec="yes"
   ])
 
-dnl The AltiVec C extensions
-dnl
-dnl There are several possible cases:
-dnl - OS X PPC, gcc 4.x: use -mpim-altivec -force_cpusubtype_ALL, don't
-dnl                      need <altivec.h>
-dnl - OS X PPC, gcc 3.x: need -faltivec, don't need <altivec.h>
-dnl - Linux PPC, gcc 3.4, 4.x: need <altivec.h> which requires -maltivec
-dnl - Linux PPC, gcc 3.3: need <altivec.h> and -maltivec -mabi=altivec
-dnl - Linux PPC, gcc 3.x: need <altivec.h> and -fvec
-dnl - Others: test should fail
   VLC_SAVE_FLAGS
   AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
-  [ac_cv_c_altivec],
-  [# OS X/PPC test (gcc 4.x)
-   CFLAGS="${CFLAGS} -mpim-altivec -force_cpusubtype_ALL"
-   AC_TRY_COMPILE([vector unsigned char foo;],
-     [vec_ld(0, (unsigned char *)0);],
-     [ac_cv_c_altivec="-mpim-altivec -force_cpusubtype_ALL"],
-     [# OS X/PPC test (gcc 3.x)
-      CFLAGS="${CFLAGS} -faltivec"
-      AC_TRY_COMPILE([vector unsigned char foo;],
-        [vec_ld(1 * sizeof(vector float), (unsigned char *)0);],
-        [ac_cv_c_altivec="-faltivec"],
-        dnl Below this are the Linux tests
-        [# Linux/PPC test (gcc 4.x)
-         CFLAGS="${CFLAGS} -maltivec"
-         AC_TRY_COMPILE([#include <altivec.h>],
-           [vec_ld(0, (unsigned char *)0);],
-           [ac_cv_c_altivec="-maltivec"],
-           [# Linux/PPC test (gcc 3.3)
-            CFLAGS="${CFLAGS} -maltivec -mabi=altivec"
-            AC_TRY_COMPILE([#include <altivec.h>],
-              [vec_ld(0, (unsigned char *)0);],
-              [ac_cv_c_altivec=""
-               ac_cv_c_altivec_abi="-maltivec -mabi=altivec"],
-              [# Linux/PPC test (gcc 3.3)
-               CFLAGS="${CFLAGS} -fvec"
-               AC_TRY_COMPILE([#include <altivec.h>],
-                 [vec_ld(0, (unsigned char *)0);],
-                 [ac_cv_c_altivec="-fvec"],
-                 [ac_cv_c_altivec=no])
-              ])
-           ])
-        ])
-     ])
+  [ac_cv_c_altivec], [
+    CFLAGS="${CFLAGS} -maltivec"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+[#include <altivec.h>]], [
+[vec_ld(0, (unsigned char *)0);]])], [
+      ac_cv_c_altivec="-maltivec"
+    ], [
+      ac_cv_c_altivec="no"
+    ])
   ])
-
   VLC_RESTORE_FLAGS
   AS_IF([test "${ac_cv_c_altivec}" != "no"], [
     CPPFLAGS="${CPPFLAGS} ${ac_cv_c_altivec}"
@@ -1535,7 +1519,7 @@ then
   AS_IF([test "${LUAC}" = "false"], [
     AC_MSG_ERROR([Could not find the LUA byte compiler.])
   ])
-  AS_IF([test -d ${CONTRIB_DIR} -a -f ${CONTRIB_DIR}/lib/liblua.a -a `echo|${LUAC} -o - -|od -j 8 -N 2 -t x2|head -n 1|cut -d' ' -f2` != 0404], [
+  AS_IF([test -d "${CONTRIB_DIR}" -a -f "${CONTRIB_DIR}"/lib/liblua.a -a `echo|${LUAC} -o - -|od -j 8 -N 2 -t x2|head -n 1|cut -d' ' -f2` != 0404], [
     AC_MSG_ERROR([You need 32-bits luac when using using lua from contrib.])
   ])
 fi
@@ -2346,24 +2330,24 @@ AS_IF([test "${enable_vda}" != "no"], [
   if test "${SYS}" = "darwin"; then
   AS_IF([test "x${have_avcodec}" = "xyes"], [
     AC_CHECK_HEADERS(VideoDecodeAcceleration/VDADecoder.h,
-    [
-      PKG_CHECK_EXISTS([libavcodec >= 55.19.0], [
-        have_avcodec_vda="yes"
-      ],[
-        AS_IF([test "${enable_vda}" = "yes"],
-         [AC_MSG_ERROR([libavcodec >= 55.19.0 is required for VDA decoding])],
-         [AC_MSG_WARN([libavcodec >= 55.19.0 is required for VDA decoding])])
-      ])
-    ],[
+      [
+        AC_CHECK_HEADERS(libavcodec/vda.h, [
+           have_avcodec_vda="yes"
+        ],[
        AS_IF([test "${enable_vda}" = "yes"],
-      [AC_MSG_ERROR([Could not find required VideoDecodeAcceleration/VDADecoder.h])],
-      [AC_MSG_WARN([VideoDecodeAcceleration/VDADecoder.h not found])])
-    ])
+             [AC_MSG_ERROR([vda is present but libavcodec/vda.h is missing])],
+              [AC_MSG_WARN([vda is present but libavcodec/vda.h is missing ])])
+        ])
+  ],[
+       AS_IF([test "${enable_vda}" = "yes"],
+              [AC_MSG_ERROR([Could not find required VideoDecodeAcceleration/VDADecoder.h])],
+              [AC_MSG_WARN([VideoDecodeAcceleration/VDADecoder.h not found])])
+      ])
   ],[
     AS_IF([test "x${enable_vda}" != "x"], [
       AC_MSG_ERROR([--enable-vda and --disable-avcodec options are mutually exclusive.])
     ])
 ])
+ ])
   fi
 ])
 AM_CONDITIONAL([HAVE_AVCODEC_VDA], [test "${have_avcodec_vda}" = "yes"])
@@ -2961,6 +2945,13 @@ EXTEND_HELP_STRING([Video plugins:])
 dnl
 dnl  OpenGL
 dnl
+PKG_CHECK_MODULES([EGL], [egl], [
+  have_egl="yes"
+], [
+  have_egl="no"
+])
+AM_CONDITIONAL([HAVE_EGL], [test "${have_egl}" = "yes"])
+
 PKG_CHECK_MODULES([GL], [gl], [
   have_gl="yes"
 ], [
@@ -2987,16 +2978,6 @@ PKG_ENABLE_MODULES_VLC([GLES2], [], [glesv2], [OpenGL ES v2 support], [disabled]
 dnl OpenGL ES 1: depends on EGL 1.0
 PKG_ENABLE_MODULES_VLC([GLES1], [], [glesv1_cm], [OpenGL ES v1 support], [disabled])
 
-AC_ARG_ENABLE(egl,
-  [  --enable-egl            OpenGL support through EGL (default disabled)],, [
-  enable_egl="no"
-])
-AS_IF([test "$enable_egl" != "no"], [
-  PKG_CHECK_MODULES([EGL], [egl], [
-    VLC_ADD_PLUGIN([egl])
-  ])
-])
-
 dnl
 dnl  Xlib
 dnl