summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-08-30 14:28:22 -0700
committerKristian Høgsberg <krh@bitplanet.net>2013-08-30 14:29:03 -0700
commit0eac34ab28693bf4367504ec15cd5b700e176ff7 (patch)
treeaf16ae6b540f5676b0b330aaa3dbb5dce612c5cb /configure.ac
parent6aae4d39d510ed4d30c029b15d01166380f63e47 (diff)
downloadweston-0eac34ab28693bf4367504ec15cd5b700e176ff7.tar.gz
weston-0eac34ab28693bf4367504ec15cd5b700e176ff7.tar.bz2
weston-0eac34ab28693bf4367504ec15cd5b700e176ff7.zip
configure.ac: Auto-enable vaapi recorder, but allow overrides
If libva is available and recent, we'll enable the vaapi recorder feature, but it can also be forced on or off by --enable/disable-vaapi-recorder.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 14 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 05d1186b..66495beb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -240,10 +240,20 @@ PKG_CHECK_MODULES(WEBP, [libwebp], [have_webp=yes], [have_webp=no])
AS_IF([test "x$have_webp" = "xyes"],
[AC_DEFINE([HAVE_WEBP], [1], [Have webp])])
-PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0], [have_libva=yes], [have_libva=no])
-AS_IF([test "x$have_libva" = "xyes"],
- [AC_DEFINE([HAVE_LIBVA], [1], [Have libva])])
-AM_CONDITIONAL(ENABLE_LIBVA, test "x$have_libva" = "xyes")
+AC_ARG_ENABLE(vaapi-recorder, [ --enable-vaapi-recorder],,
+ enable_vaapi_recorder=auto)
+if test x$enable_vaapi_recorder != xno; then
+ PKG_CHECK_MODULES(LIBVA, [libva >= 0.34.0 libva-drm >= 0.34.0],
+ [have_libva=yes], [have_libva=no])
+ if test "x$have_libva" = "xno" -a "x$enable_vaapi_recorder" = "xyes"; then
+ AC_MSG_ERROR([vaapi-recorder explicitly enabled, but libva couldn't be found])
+ else
+ AC_DEFINE([BUILD_VAAPI_RECORDER], [1], [Build the vaapi recorder])
+ fi
+fi
+AM_CONDITIONAL(ENABLE_VAAPI_RECORDER,
+ test "x$enable_libva_recorder" != xno -a "x$have_libva" = xyes)
+
AC_CHECK_LIB([jpeg], [jpeg_CreateDecompress], have_jpeglib=yes)
if test x$have_jpeglib = xyes; then