[Nouveau] [PATCH] Make building of glamor optional

Chí-Thanh Christopher Nguyễn chithanh at gentoo.org
Thu Oct 23 07:54:01 PDT 2014


---
 configure.ac | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index ccf320a..56b08ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,17 +140,29 @@ if test "x$have_list_h" = xyes; then
                    #include "list.h"])
 fi
 
-AC_CHECK_HEADERS([glamor.h],[found_glamor_header=yes],[found_glamor_header=no],
-		 [#include "xorg-server.h"])
-AC_MSG_CHECKING([whether to include GLAMOR support])
-if test "x$found_glamor_header" = xyes && pkg-config --exists "xorg-server >= 1.15.99.901"
-then
-	AC_DEFINE(HAVE_GLAMOR, 1, [Build support for glamor acceleration])
-	AC_MSG_RESULT([yes])
-else
-	AC_MSG_RESULT([no])
+AC_ARG_ENABLE(glamor,
+		AS_HELP_STRING([--enable-glamor],
+				[Enable glamor, a new GL-based acceleration [default=auto]]),
+		[GLAMOR="$enableval"],
+		[GLAMOR=auto])
+
+if test "x$GLAMOR" != "xno"; then
+	AC_CHECK_HEADERS([glamor.h],[found_glamor_header=yes],[found_glamor_header=no],
+			 [#include "xorg-server.h"])
+	AC_MSG_CHECKING([whether to include GLAMOR support])
+	if test "x$found_glamor_header" = xyes && pkg-config --exists "xorg-server >= 1.15.99.901"
+	then
+		AC_DEFINE(HAVE_GLAMOR, 1, [Build support for glamor acceleration])
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		if test "x$GLAMOR" != "xauto"; then
+			AC_MSG_ERROR([failed to find required Xorg headers for glamor])
+		fi
+	fi
 fi
 
+
 AC_CONFIG_FILES([
 	Makefile
 	src/Makefile
-- 
2.0.4



More information about the Nouveau mailing list