diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-07-13 11:28:41 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-07-13 11:28:41 -0400 |
commit | ca4a9efef987108266ae59afbb5142d4d2000c8e (patch) | |
tree | 7ec8728c915284fac586e067823bbd4253e60eea | |
parent | 035e8d1d5593c12828bb079de4e663cf1b1f1674 (diff) |
Add configure option to disable kms support
Useful to building with mixed kms/non-kms setups
-rw-r--r-- | configure.ac | 29 |
1 files 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 <stdint.h> + 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 <stdint.h> #include <stdlib.h>]) - 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 |