diff mbox

[igt,1/9] configure.ac: Test for libdrm_vc4 and build vc4 tests based on it.

Message ID 1454535703-660-1-git-send-email-eric@anholt.net (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Anholt Feb. 3, 2016, 9:41 p.m. UTC
Signed-off-by: Eric Anholt <eric@anholt.net>
---
 configure.ac | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index ecbfacd..cfbcbf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,6 +149,18 @@  if test "x$NOUVEAU" = xyes; then
 fi
 AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes])
 
+AC_ARG_ENABLE(vc4, AS_HELP_STRING([--disable-vc4],
+	      [Enable building of vc4 tests (default: auto)]),
+	      [VC4=$enableval], [VC4=auto])
+if test "x$VC4" = xauto; then
+	PKG_CHECK_EXISTS([libdrm_vc4], [VC4=yes], [VC4=no])
+fi
+if test "x$VC4" = xyes; then
+	PKG_CHECK_MODULES(DRM_VC4, [libdrm_vc4])
+	AC_DEFINE(HAVE_VC4, 1, [Have vc4 support])
+fi
+AM_CONDITIONAL(HAVE_VC4, [test "x$VC4" = xyes])
+
 # Define a configure option for the shader debugger
 AC_ARG_ENABLE(shader-debugger, AS_HELP_STRING([--enable-shader-debugger],
 	      [Enable shader debugging support [autodetected]]),