[Mesa-stable] [PATCH v2 22/27] configure: error out if building VA w/o supported platform

Emil Velikov emil.l.velikov at gmail.com
Thu May 4 16:33:13 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

A bit pedantic patch to fool proof should someone start thinkering
without knowing what they do.

Cc: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 configure.ac | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index bb81faab110..9674f590ba4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2067,6 +2067,12 @@ if test "x$enable_xa" = xyes; then
 fi
 AM_CONDITIONAL(HAVE_ST_XA, test "x$enable_xa" = xyes)
 
+if echo $platforms | grep -q "x11\|drm\|wayland"; then
+    have_va_platform=yes
+else
+    have_va_platform=no
+fi
+
 dnl
 dnl Gallium G3DVL configuration
 dnl
@@ -2083,7 +2089,7 @@ if test -n "$with_gallium_drivers" -a "x$with_gallium_drivers" != xswrast; then
 	PKG_CHECK_EXISTS([libomxil-bellagio >= $LIBOMXIL_BELLAGIO_REQUIRED], [enable_omx=yes], [enable_omx=no])
     fi
 
-    if test "x$enable_va" = xauto; then
+    if test "x$enable_va" = xauto -a "x$have_va_platform" = xyes; then
         PKG_CHECK_EXISTS([libva >= $LIBVA_REQUIRED], [enable_va=yes], [enable_va=no])
     fi
 fi
@@ -2126,6 +2132,9 @@ fi
 AM_CONDITIONAL(HAVE_ST_OMX, test "x$enable_omx" = xyes)
 
 if test "x$enable_va" = xyes; then
+    if test "x$have_va_platform" != xyes; then
+        AC_MSG_ERROR([VA requires at least one of the x11 drm or wayland platforms])
+    fi
     PKG_CHECK_MODULES([VA], [libva >= $LIBVA_REQUIRED])
     gallium_st="$gallium_st va"
 fi
-- 
2.12.2



More information about the mesa-stable mailing list