]> git.sesse.net Git - vlc/commitdiff
Add configure.ac detection of libva, default disabled.
authorKonstantin Pavlov <thresh@altlinux.org>
Wed, 29 Jul 2009 09:38:07 +0000 (13:38 +0400)
committerKonstantin Pavlov <thresh@altlinux.org>
Fri, 16 Oct 2009 07:26:58 +0000 (11:26 +0400)
This enables building avcodec plugin with VAAPI support.

configure.ac

index edc5f4482dc311ac576b004eb0afece9eeb57360..dbde8a8b00f9ae9d6390c08141372ade6f4a606c 100644 (file)
@@ -2931,6 +2931,26 @@ then
   ])
 fi
 
+dnl
+dnl libva needs avcodec
+dnl
+AC_ARG_ENABLE(libva,
+  [  --enable-libva         libva VAAPI support (default disabled)])
+AS_IF([test "${enable_libva}" = "yes"], [
+  AS_IF([test "x${have_avcodec}" = "xyes"], [
+    PKG_CHECK_MODULES(LIBVA, [libva libva-x11],
+      [
+        VLC_ADD_LIBS([avcodec],[$LIBVA_LIBS])
+        VLC_ADD_CFLAGS([avcodec],[$LIBVA_CFLAGS])
+        AC_DEFINE(HAVE_AVCODEC_VAAPI, 1, [Define if avcodec has to be built with VAAPI support.])
+      ],[
+        AC_MSG_ERROR([Could not find libva.])
+    ])
+  ],[
+    AC_MSG_ERROR([libva VAAPI support depends on libavcodec.])
+  ])
+])
+
 dnl
 dnl stream_out switcher needs libavcodec
 dnl