From ca4a9efef987108266ae59afbb5142d4d2000c8e Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 13 Jul 2009 11:28:41 -0400 Subject: Add configure option to disable kms support Useful to building with mixed kms/non-kms setups --- configure.ac | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 12be3072..39018b8a 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,12 @@ AC_ARG_ENABLE(exa, [EXA="$enableval"], [EXA=yes]) +AC_ARG_ENABLE(kms, + AC_HELP_STRING([--disable-kms], + [Disable KMS support [[default=enabled]]]), + [DRM_MODE="$enableval"], + [DRM_MODE=yes]) + AC_ARG_WITH(xserver-source,AC_HELP_STRING([--with-xserver-source=XSERVER_SOURCE], [Path to X server source tree]), [ XSERVER_SOURCE="$withval" ], @@ -125,17 +131,20 @@ if test "$DRI" = yes; then save_CFLAGS="$CFLAGS" CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $CFLAGS" - AC_CHECK_HEADER(xf86drmMode.h,[DRM_MODE=yes],[DRM_MODE=no],[#include + AM_CONDITIONAL(DRM_MODE, test x$DRM_MODE = xyes) + if test "$DRM_MODE" = yes; then + AC_CHECK_HEADER(xf86drmMode.h,[DRM_MODE=yes],[DRM_MODE=no],[#include #include ]) - if test "x$DRM_MODE" = xyes; then - PKG_CHECK_MODULES(LIBDRM_RADEON, [xorg-server >= 1.6 libdrm_radeon], - [LIBDRM_RADEON=yes], [LIBDRM_RADEON=no]) - - if test "x$LIBDRM_RADEON" = xyes; then - AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting]) - AC_DEFINE(RADEON_DRI2, 1,[Enable DRI2 code]) - fi - fi + if test "x$DRM_MODE" = xyes; then + PKG_CHECK_MODULES(LIBDRM_RADEON, [xorg-server >= 1.6 libdrm_radeon], + [LIBDRM_RADEON=yes], [LIBDRM_RADEON=no]) + + if test "x$LIBDRM_RADEON" = xyes; then + AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting]) + AC_DEFINE(RADEON_DRI2, 1,[Enable DRI2 code]) + fi + fi + fi CFLAGS="$save_CFLAGS" fi -- cgit v1.2.3