[PATCH v2 1/3] configure: introduce --{enable,disable}-libdrm

Tiago Vignatti tiago.vignatti at nokia.com
Sat Feb 6 04:24:03 PST 2010


Some drivers use DRI protocol but implement their own kernel rendering
manager. For these drivers, libdrm becomes useless.

Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
Tested-by: Gaetan Nadon <memsize at videotron.ca>
---
changes from v1:
removal of useless AC_SUBST (pointed by Gaetan)

 configure.ac             |    8 +++++---
 include/xorg-config.h.in |    3 +++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index ec9442b..4ee6d02 100644
--- a/configure.ac
+++ b/configure.ac
@@ -624,6 +624,7 @@ AC_ARG_ENABLE(xaa,               AS_HELP_STRING([--enable-xaa], [Build XAA (defa
 AC_ARG_ENABLE(vgahw,          AS_HELP_STRING([--enable-vgahw], [Build Xorg with vga access (default: enabled)]), [VGAHW=$enableval], [VGAHW=yes])
 AC_ARG_ENABLE(vbe,            AS_HELP_STRING([--enable-vbe], [Build Xorg with VBE module (default: enabled)]), [VBE=$enableval], [VBE=yes])
 AC_ARG_ENABLE(int10-module,     AS_HELP_STRING([--enable-int10-module], [Build Xorg with int10 module (default: enabled)]), [INT10MODULE=$enableval], [INT10MODULE=yes])
+AC_ARG_ENABLE(libdrm, AS_HELP_STRING([--enable-libdrm], [Build Xorg with libdrm support (default: enabled)]), [DRM=$enableval],[DRM=yes])
 
 dnl DDXes.
 AC_ARG_ENABLE(xorg,    	      AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
@@ -1005,9 +1006,10 @@ esac
 AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
 
 if test "x$DRI" = xyes || test "x$DRI2" = xyes; then
-	PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
-	AC_SUBST(LIBDRM_CFLAGS)
-	AC_SUBST(LIBDRM_LIBS)
+	if test "x$DRM" = xyes; then
+		AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support])
+		PKG_CHECK_MODULES([LIBDRM], $LIBDRM)
+	fi
 fi
 
 if test "x$DRI2" = xyes; then
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index 8946a65..56ffda2 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -139,4 +139,7 @@
 /* Support PC98 */
 #undef SUPPORT_PC98
 
+/* Build with libdrm support */
+#undef WITH_LIBDRM
+
 #endif /* _XORG_CONFIG_H_ */
-- 
1.6.0.4



More information about the xorg-devel mailing list