[PATCH:intel-gpu-tools 4/4] Add --disable-nouveau option for platforms without nouveau support

Alan Coopersmith alan.coopersmith at oracle.com
Fri Aug 24 14:02:04 PDT 2012


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 configure.ac      |   11 ++++++++++-
 tests/Makefile.am |   11 ++++++++---
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 74aa101..c493058 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,7 +60,16 @@ PKG_CHECK_MODULES(DRM, [libdrm_intel >= 2.4.38 libdrm])
 PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
 
 # for dma-buf tests
-PKG_CHECK_MODULES(DRM_NOUVEAU, [libdrm_nouveau >= 2.4.33])
+AC_ARG_ENABLE(nouveau,
+              AS_HELP_STRING([--disable-nouveau],
+              [Enable use of nouveau API for prime tests (default: enabled)]),
+              [NOUVEAU=$enableval], [NOUVEAU=yes])
+if test "x$NOUVEAU" = xyes; then
+   PKG_CHECK_MODULES(DRM_NOUVEAU, [libdrm_nouveau >= 2.4.33])
+   AC_DEFINE(HAVE_NOUVEAU, 1, [Have nouveau support])
+fi
+AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes])
+
 
 # for testdisplay
 PKG_CHECK_MODULES(CAIRO, cairo)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9f8c798..e29a383 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -4,6 +4,13 @@ noinst_PROGRAMS = \
 	$(HANG) \
 	$(NULL)
 
+if HAVE_NOUVEAU
+NOUVEAU_TESTS = \
+	prime_nv_api  \
+	prime_nv_pcopy \
+	prime_nv_test
+endif
+
 TESTS_progs = \
 	getversion \
 	getclient \
@@ -71,9 +78,7 @@ TESTS_progs = \
 	gem_ctx_bad_exec \
 	gem_ctx_basic \
 	gem_reg_read \
-	prime_nv_api  \
-	prime_nv_pcopy \
-	prime_nv_test \
+	$(NOUVEAU_TESTS) \
 	prime_self_import \
 	$(NULL)
 
-- 
1.7.9.2



More information about the xorg-devel mailing list