[PATCH][vmware] build: add explicit option to enable/disable VMWGFX

Ross Burton ross.burton at intel.com
Thu Sep 12 04:21:25 PDT 2013


Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 configure.ac |   31 ++++++++++++++-----------------
 1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/configure.ac b/configure.ac
index dccfb27..5fc34fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,11 +85,6 @@ PKG_CHECK_EXISTS([xorg-server >= 1.4.99],
                  [AC_DEFINE([HAVE_XORG_SERVER_1_5_0], 1,
                  [Has version 1.5.0 or greater of the Xserver])])
 
-PKG_CHECK_EXISTS([xorg-server >= 1.7.0],
-                 [AC_DEFINE([HAVE_XORG_SERVER_1_7_0], 1,
-                 [Has version 1.7.0 or greater of the Xserver])
-		 BUILD_VMWGFX=yes],[BUILD_VMWGFX=no])
-
 PKG_CHECK_EXISTS([xorg-server >= 1.12.0],
                  [AC_DEFINE([HAVE_XORG_SERVER_1_12_0], 1,
                  [Has version 1.12.0 or greater of the Xserver])])
@@ -114,25 +109,27 @@ AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
 
 AC_SUBST([moduledir])
 
-if test x$BUILD_VMWGFX = xyes; then
-	PKG_CHECK_MODULES([LIBDRM], [libdrm],[],[BUILD_VMWGFX=no])
-fi
-if test x$BUILD_VMWGFX = xyes; then
-	PKG_CHECK_MODULES([XATRACKER], [xatracker >= 2.0.0],[],[BUILD_VMWGFX=no])
-fi
-
 DRIVER_NAME=vmware
 AC_SUBST([DRIVER_NAME])
 
+AC_ARG_ENABLE(vmwgfx,
+              AS_HELP_STRING([--disable-vmwgfx],
+                             [Disable vmwgfx driver (KMS/3D) (default: enabled)]),
+                             [VMWGFX="$enableval"], [VMWGFX="yes"])
+
 AC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D])
-if test x$BUILD_VMWGFX = xyes; then
-	AC_MSG_RESULT([yes])
+if test "x$VMWGFX" = xyes; then
+        AC_MSG_RESULT([yes])
+        PKG_CHECK_EXISTS([xorg-server >= 1.7.0],
+                         [AC_DEFINE([HAVE_XORG_SERVER_1_7_0], 1,
+                         [Has version 1.7.0 or greater of the Xserver])])
+        PKG_CHECK_MODULES([LIBDRM], [libdrm])
+        PKG_CHECK_MODULES([XATRACKER], [xatracker >= 2.0.0])
         AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path])
 else
-	AC_MSG_RESULT([no])
+        AC_MSG_RESULT([no])
 fi
-
-AM_CONDITIONAL(BUILD_VMWGFX, test "x$BUILD_VMWGFX" = xyes)
+AM_CONDITIONAL(BUILD_VMWGFX, test "x$VMWGFX" = xyes)
 
 AC_CONFIG_FILES([
                 Makefile
-- 
1.7.10.4



More information about the xorg-devel mailing list