]> git.sesse.net Git - vlc/blobdiff - configure.ac
wasapi: retry if device is invalidated during open (refs #6826)
[vlc] / configure.ac
index 1861e900556b00117137155a4bbdeaa258c68595..7ac07e47ac00247e6dcb7d8952ebcc5a25750dc8 100644 (file)
@@ -173,29 +173,34 @@ case "${host_os}" in
             AC_LIBOBJ([strnlen])],)
 
     dnl
-    dnl  Check for Mac OS X SDK settings
+    dnl  Handle Mac OS X SDK flags
     dnl
     AC_ARG_WITH(macosx-sdk,
       [AS_HELP_STRING([--with-macosx-sdk=DIR],
         [compile using the SDK in DIR])])
-    test "${with_macosx_sdk}" = "" && with_macosx_sdk=/Developer/SDKs/MacOSX10.6.sdk
-    test ! -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
+    if test "${with_macosx_sdk}" != "" ; then
+        test ! -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
+        CPP="${CPP} -isysroot ${with_macosx_sdk}"
+        CC="${CC} -isysroot ${with_macosx_sdk}"
+        CXX="${CXX} -isysroot ${with_macosx_sdk}"
+        OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
+        LD="${LD} -syslibroot ${with_macosx_sdk}"
+    fi
     AC_ARG_WITH(macosx-version-min,
       [AS_HELP_STRING([--with-macosx-version-min=VERSION],
-        [compile for MacOS X VERSION and above])])
-    if test "${with_macosx_version_min}" = "" ; then
-       with_macosx_version_min=10.5
+        [compile for Mac OS X VERSION and above])])
+    if test "${with_macosx_version_min}" != "" ; then
+        MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
+        CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}"
+        CC="${CC} -mmacosx-version-min=${with_macosx_version_min}"
+        CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}"
+        OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}"
+        LD="${LD} -mmacosx_version_min=${with_macosx_version_min}"
+        CFLAGS="${CFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
+        CXXFLAGS="${CXXFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
+        OBJCFLAGS="${OBJCFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
+        export MACOSX_DEPLOYMENT_TARGET
     fi
-    MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
-    CPP="${CPP} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
-    CC="${CC} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
-    CXX="${CXX} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
-    OBJC="${OBJC} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
-    LD="${LD} -syslibroot ${with_macosx_sdk} -mmacosx_version_min=${with_macosx_version_min}"
-    CFLAGS="${CFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
-    CXXFLAGS="${CXXFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
-    OBJCFLAGS="${OBJCFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
-    export MACOSX_DEPLOYMENT_TARGET
     ;;
   *mingw32* | *cygwin* | *wince* | *mingwce*)
     AC_CHECK_TOOL(WINDRES, windres, :)
@@ -794,14 +799,6 @@ then
           VLC_ADD_LIBS([dbus],[$DBUS_LIBS])
           VLC_ADD_CFLAGS([dbus],[$DBUS_CFLAGS])
         fi
-      dnl Check for Telepathy
-        AC_ARG_ENABLE(telepathy,
-          AS_HELP_STRING([--enable-telepathy],[Telepathy Presence plugin through DBus(default enabled)]))
-        if test "${enable_telepathy}" != "no"; then
-          VLC_ADD_PLUGIN([telepathy])
-          VLC_ADD_LIBS([telepathy],[$DBUS_LIBS])
-          VLC_ADD_CFLAGS([telepathy],[$DBUS_CFLAGS])
-        fi
         dnl Power Management Inhibiter
         VLC_ADD_PLUGIN([inhibit])
         VLC_ADD_LIBS([inhibit],[$DBUS_LIBS])
@@ -1333,7 +1330,6 @@ asm volatile("ssat r0, #1, r0":::"r0"); /* assume ARMv6 */
   VLC_RESTORE_FLAGS
   AS_IF([test "$ac_cv_neon_inline" != "no"], [
     NEON_CFLAGS="$ac_cv_neon_inline"
-    AC_DEFINE([CAN_COMPILE_NEON], 1, [Define to 1 if NEON (and ARMv6) assembly is available with NEON_CFLAGS.])
   ])
 ], [
   ac_cv_neon_inline="no"
@@ -1581,7 +1577,14 @@ AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
   AC_LANG_PUSH(C++)
   VLC_SAVE_FLAGS
   AS_IF([test -z "${CONTRIB_DIR}"], [
-    CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
+    AS_IF([test ${SYS} != "os2"], [
+      LIVE555_PREFIX=${LIVE555_PREFIX-"/usr"}
+      CPPFLAGS_live555="-I${LIVE555_PREFIX}/include/liveMedia -I${LIVE555_PREFIX}/include/groupsock -I${LIVE555_PREFIX}/include/BasicUsageEnvironment -I${LIVE555_PREFIX}/include/UsageEnvironment"
+    ], [
+      LIVE555_PREFIX=${LIVE555_PREFIX-"/usr/lib/live"}
+      CPPFLAGS_live555="-I${LIVE555_PREFIX}/liveMedia/include -I${LIVE555_PREFIX}/groupsock/include -I${LIVE555_PREFIX}/BasicUsageEnvironment/include -I${LIVE555_PREFIX}/UsageEnvironment/include"
+      LDFLAGS_live555="-L${LIVE555_PREFIX}/liveMedia -L${LIVE555_PREFIX}/groupsock -L${LIVE555_PREFIX}/BasicUsageEnvironment -L${LIVE555_PREFIX}/UsageEnvironment"
+    ])
   ], [
     CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
   ])
@@ -1589,6 +1592,7 @@ AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"], [
     CPPFLAGS_live555="${CPPFLAGS_live555} -DSOLARIS"
   ])
   CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
+  LDFLAGS="${LDFLAGS} ${LDFLAGS_live555}"
 
   AC_CACHE_CHECK([for live555 version 1324598400 or later], [ac_cv_live555], [
     AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
@@ -1623,6 +1627,7 @@ You can get an updated one from http://www.live555.com/liveMedia .])
     dnl We need to check for pic because live555 don't provide shared libs
     dnl and we want to build a plugins so we need -fPIC on some arch.
     VLC_ADD_CXXFLAGS([live555], [${CPPFLAGS_live555}])
+    VLC_ADD_LDFLAGS([live555], [${LDFLAGS_live555}])
     AC_CHECK_LIB(liveMedia_pic, main, [
       VLC_ADD_PLUGIN([live555])
       VLC_ADD_LIBS([live555], [-lliveMedia_pic ${other_libs_pic}])
@@ -1753,7 +1758,7 @@ AS_IF([test "$enable_v4l2" != "no"], [
   AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
     have_v4l2="yes"
   ])
-  AC_CHECK_DECLS([V4L2_CTRL_TYPE_BITMASK],,, [
+  AC_CHECK_DECLS([V4L2_CTRL_TYPE_BITMASK,V4L2_CTRL_TYPE_INTEGER_MENU],,, [
 #ifdef HAVE_LINUX_VIDEODEV2_H
 # include <linux/videodev2.h>
 #endif
@@ -2360,6 +2365,38 @@ AS_IF([test "${enable_dxva2}" != "no"], [
   fi
 ])
 
+dnl
+dnl vda needs avcodec
+dnl
+AC_ARG_ENABLE(vda,
+  [  --enable-vda          VDA  support (default auto)])
+
+AS_IF([test "${enable_vda}" != "no"], [
+  if test "${SYS}" = "darwin"; then
+  AS_IF([test "x${have_avcodec}" = "xyes"], [
+    AC_CHECK_HEADERS(VideoDecodeAcceleration/VDADecoder.h,
+      [
+        AC_CHECK_HEADERS(libavcodec/vda.h, [
+           VLC_ADD_LIBS([avcodec],[-Wl,-framework,CoreFoundation,-framework,VideoDecodeAcceleration,-framework,QuartzCore])
+           VLC_ADD_LDFLAGS([vda],[-Wl,-framework,CoreFoundation,-framework,VideoDecodeAcceleration,-framework,QuartzCore])
+           AC_DEFINE(HAVE_AVCODEC_VDA, 1, [Define if avcodec has to be built with VDA support.])
+        ],[
+       AS_IF([test "${enable_vda}" == "yes"],
+             [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
+])
 
 dnl
 dnl stream_out switcher needs libavcodec
@@ -3138,33 +3175,40 @@ then
 fi
 
 AC_ARG_ENABLE(directx,
-  [  --enable-directx        Win32 DirectX support (default enabled on Win32)])
-if test "${enable_directx}" != "no"; then
-  if test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"; then
-      dnl DDraw
-      AC_CHECK_HEADERS(ddraw.h,
-      [ VLC_ADD_PLUGIN([directx aout_directx])
-        VLC_ADD_LIBS([directx],[-luser32 -lgdi32])
-      ],[AC_MSG_ERROR([Cannot find DirectX headers!])]
-      )
-
-      dnl OpenGL
-      AC_CHECK_HEADERS(GL/wglew.h,
-      [ VLC_ADD_PLUGIN([glwin32])
-        VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
-      ],[],[
-        #include <windows.h>
-        #include <GL/gl.h>
-      ])
+  [AS_HELP_STRING([--enable-directx],
+    [Microsoft DirectX support (default enabled on Windows)])],, [
+  AS_IF([test "${SYS}" = "mingw32" -o "${SYS}" = "mingwce"], [
+    enable_directx="yes"
+  ], [
+    enable_directx="no"
+  ])
+])
+have_directx="no"
+AS_IF([test "${enable_directx}" != "no"], [
+  dnl DirectDraw
+  AC_CHECK_HEADERS(ddraw.h, [
+    have_directx="yes"
+  ], [
+    AC_MSG_ERROR([Cannot find DirectX headers!])
+  ])
 
-      dnl Direct3D
-      AC_CHECK_HEADERS(d3d9.h,
-      [ VLC_ADD_PLUGIN([direct3d])
-        VLC_ADD_LIBS([direct3d],[-lgdi32])
-      ])
-      VLC_ADD_LIBS([direct3d directx glwin32],[-lole32 -luuid])
-  fi
-fi
+  dnl OpenGL
+  AC_CHECK_HEADERS(GL/wglew.h, [
+    VLC_ADD_PLUGIN([glwin32])
+    VLC_ADD_LIBS([glwin32],[-lopengl32 -lgdi32])
+   ],, [
+     #include <windows.h>
+     #include <GL/gl.h>
+   ])
+
+   dnl Direct3D
+   AC_CHECK_HEADERS(d3d9.h, [
+     VLC_ADD_PLUGIN([direct3d])
+     VLC_ADD_LIBS([direct3d],[-lgdi32])
+   ])
+   VLC_ADD_LIBS([direct3d glwin32],[-lole32 -luuid])
+])
+AM_CONDITIONAL([HAVE_DIRECTX], [test "$have_directx" = "yes"])
 
 dnl
 dnl  Windows Direct2D plugin
@@ -3530,32 +3574,6 @@ dnl
 
 EXTEND_HELP_STRING([Interface plugins:])
 
-dnl
-dnl Hildon UI
-dnl
-AC_ARG_ENABLE(hildon,
-  [  --enable-hildon         Hildon touchscreen UI (default disabled)])
-AS_IF([test "${enable_hildon}" = "yes"], [
-  PKG_CHECK_MODULES(HILDON, [hildon-1], [
-    PKG_CHECK_MODULES(HILDON_FM, hildon-fm-2, [
-      VLC_ADD_CFLAGS([hildon],[${HILDON_FM_CFLAGS} -DHAVE_HILDON_FM])
-      VLC_ADD_LIBS([hildon],[${HILDON_FM_LIBS}])
-    ], [
-      AC_MSG_WARN([${HILDON_FM_PKG_ERRORS}.])
-    ])
-    VLC_ADD_CFLAGS([hildon],[${HILDON_CFLAGS} ${X_CFLAGS}])
-    VLC_ADD_LIBS([hildon],[${HILDON_LIBS} ${X_LIBS} ${X_PRE_LIBS} -lX11])
-    VLC_ADD_PLUGIN([hildon])
-    ALIASES="${ALIASES} mvlc"
-  ], [
-    AS_IF([test "${enable_hildon}" = "yes"],[
-      AC_MSG_ERROR([${HILDON_PKG_ERRORS}.])
-    ])
-    enable_hildon="no"
-  ])
-])
-AM_CONDITIONAL(BUILD_HILDON, [test "${enable_hildon}" = "yes"])
-
 dnl
 dnl QT
 dnl
@@ -4169,7 +4187,6 @@ AC_CONFIG_FILES([
   modules/demux/playlist/Makefile
   modules/gui/Makefile
   modules/gui/macosx/Makefile
-  modules/gui/hildon/Makefile
   modules/gui/minimal_macosx/Makefile
   modules/gui/macosx_dialog_provider/Makefile
   modules/gui/qt4/Makefile