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-09-26 14:42:17 +0200
commitb07b4900a213302c0b80587831c6ccaee1d2460f (patch)
treebcfd7040c8358f5f3cff23601d186e94da79d8b0 /configure.ac
parent95823c78dd7482a2384bd80483931a3840235187 (diff)
downloadvaapi-intel-driver-b07b4900a213302c0b80587831c6ccaee1d2460f.tar.gz
vaapi-intel-driver-b07b4900a213302c0b80587831c6ccaee1d2460f.tar.bz2
vaapi-intel-driver-b07b4900a213302c0b80587831c6ccaee1d2460f.zip
Allow build without VA/X11 API.
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.ac18
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 88e8306..6bd5d90 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,11 @@ AC_ARG_ENABLE(drm,
[build with VA/DRM API support @<:@default=yes@:>@])],
[], [enable_drm="yes"])
+AC_ARG_ENABLE(x11,
+ [AC_HELP_STRING([--enable-x11],
+ [build with VA/X11 API support @<:@default=yes@:>@])],
+ [], [enable_x11="yes"])
+
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PROG_CC
@@ -70,7 +75,6 @@ AC_PATH_PROG([GEN4ASM], [intel-gen4asm])
dnl Check for VA-API
PKG_CHECK_MODULES(LIBVA_DEPS, [libva >= va_api_version])
-PKG_CHECK_MODULES(LIBVA_X11_DEPS, [libva-x11])
dnl Check for VA/DRM API
USE_DRM="$enable_drm"
@@ -103,6 +107,15 @@ VA_DRIVER_INIT_FUNC="__vaDriverInit_${VA_MAJOR_VERSION}_${VA_MINOR_VERSION}"
AC_DEFINE_UNQUOTED([VA_DRIVER_INIT_FUNC], [$VA_DRIVER_INIT_FUNC],
[Define driver entry-point])
+dnl Check for VA/DRM API
+USE_X11="$enable_x11"
+if test "$USE_X11" = "yes"; then
+ PKG_CHECK_MODULES(LIBVA_X11_DEPS, [libva-x11],
+ [AC_DEFINE([HAVE_VA_X11], [1], [Defined to 1 if VA/X11 API is enabled])],
+ [USE_X11="no"])
+fi
+AM_CONDITIONAL(USE_X11, test "$USE_X11" = "yes")
+
dnl Check for VA-API drivers path
AC_MSG_CHECKING([for VA drivers path])
LIBVA_DRIVERS_PATH=`$PKG_CONFIG libva --variable driverdir`
@@ -128,8 +141,9 @@ AC_OUTPUT([
])
dnl Print summary
-BACKENDS="x11"
+BACKENDS=""
AS_IF([test "$USE_DRM" = "yes"], [BACKENDS="$BACKENDS drm"])
+AS_IF([test "$USE_X11" = "yes"], [BACKENDS="$BACKENDS x11"])
echo
echo $PACKAGE configuration summary: