summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDmitry Ermilov <dmitry.ermilov@intel.com>2012-06-07 08:03:01 -0400
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-08-06 14:13:00 +0200
commit5d9ed6e93de1f32921ea24bf248c5fc3f07f4a7b (patch)
treef9d6b47548347d2f913705f573c74885025b0dcc /configure.ac
parent68242a42f74d20cc15194aad8ee0f110fad4c5df (diff)
downloadlibva-intel-driver-5d9ed6e93de1f32921ea24bf248c5fc3f07f4a7b.tar.gz
libva-intel-driver-5d9ed6e93de1f32921ea24bf248c5fc3f07f4a7b.tar.bz2
libva-intel-driver-5d9ed6e93de1f32921ea24bf248c5fc3f07f4a7b.zip
Add raw DRM support.
Signed-off-by: Dmitry Ermilov <dmitry.ermilov@intel.com> Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 26 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1093ba0..d5fa71e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,11 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [
AC_SUBST(AM_DEFAULT_VERBOSITY)
])
+AC_ARG_ENABLE(drm,
+ [AC_HELP_STRING([--enable-drm],
+ [build with VA/DRM API support @<:@default=yes@:>@])],
+ [], [enable_drm="yes"])
+
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PROG_CC
@@ -67,6 +72,23 @@ dnl Check for VA-API
PKG_CHECK_MODULES(LIBVA_DEPS, [libva >= libva_version])
PKG_CHECK_MODULES(LIBVA_X11_DEPS, [libva-x11])
+dnl Check for VA/DRM API
+USE_DRM="$enable_drm"
+if test "$USE_DRM" = "yes"; then
+ PKG_CHECK_MODULES(LIBVA_DRM_DEPS, [libva-drm],
+ [AC_DEFINE([HAVE_VA_DRM], [1], [Defined to 1 if VA/DRM API is enabled])],
+ [USE_DRM="no"])
+
+ # Check for <drm_fourcc.h>
+ if test "$USE_DRM" = "yes"; then
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $DRM_CFLAGS"
+ AC_CHECK_HEADERS([drm_fourcc.h], [:], [USE_DRM="no"])
+ CPPFLAGS="$saved_CPPFLAGS"
+ fi
+fi
+AM_CONDITIONAL(USE_DRM, test "$USE_DRM" = "yes")
+
VA_VERSION=`$PKG_CONFIG --modversion libva`
VA_MAJOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f1`
VA_MINOR_VERSION=`echo "$VA_VERSION" | cut -d'.' -f2`
@@ -109,9 +131,13 @@ AC_OUTPUT([
])
dnl Print summary
+BACKENDS="x11"
+AS_IF([test "$USE_DRM" = "yes"], [BACKENDS="$BACKENDS drm"])
+
echo
echo $PACKAGE configuration summary:
echo
echo VA-API version ................... : $VA_VERSION_STR
echo VA-API drivers path .............. : $LIBVA_DRIVERS_PATH
+echo Windowing systems ................ : $BACKENDS
echo