From cfacbc598926df16e17b37eccbe13e5a712a2d51 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 28 Jun 2010 21:29:29 +0200 Subject: Rationalise and fix KMS enable/disable configure option --- configure.ac | 4 ++-- src/glamo-driver.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index e2f7ba1..037a98a 100644 --- a/configure.ac +++ b/configure.ac @@ -84,12 +84,12 @@ fi # Check if KMS is to be included AC_MSG_CHECKING([whether to use KMS]) -AC_DEFINE(ENABLE_KMS, 1, [Define to 1 if KMS is to be supported]) AC_ARG_ENABLE(kms, [ --enable-kms Include support for kernel modesetting (KMS)], [case "${enableval}" in yes) kms=true - AC_MSG_RESULT([yes]) ;; + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_KMS, 1, [Define to 1 if KMS is to be supported]);; no) kms=false AC_MSG_RESULT([no]) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-kms) ;; diff --git a/src/glamo-driver.c b/src/glamo-driver.c index a9005b9..b13caae 100644 --- a/src/glamo-driver.c +++ b/src/glamo-driver.c @@ -325,7 +325,7 @@ GlamoFbdevProbe(DriverPtr drv, GDevPtr *devSections, int numDevSections) return foundScreen; } -#ifdef ENABLE_KMS +#ifdef HAVE_KMS static Bool GlamoKMSProbe(DriverPtr drv, GDevPtr *devSections, int numDevSections) @@ -369,7 +369,7 @@ GlamoKMSProbe(DriverPtr drv, GDevPtr *devSections, int numDevSections) return foundScreen; } -#endif /* ENABLE_KMS */ +#endif /* HAVE_KMS */ static Bool GlamoProbe(DriverPtr drv, int flags) @@ -388,15 +388,15 @@ GlamoProbe(DriverPtr drv, int flags) if (numDevSections <= 0) return FALSE; /* Is today a good day to use KMS? */ -#ifdef ENABLE_KMS +#ifdef HAVE_KMS if ( GlamoKernelModesettingAvailable() ) { foundScreen = GlamoKMSProbe(drv, devSections, numDevSections); } else { foundScreen = GlamoFbdevProbe(drv, devSections, numDevSections); } -#else /* ENABLE_KMS */ +#else /* HAVE_KMS */ foundScreen = GlamoFbdevProbe(drv, devSections, numDevSections); -#endif /* ENABLE_KMS */ +#endif /* HAVE_KMS */ free(devSections); TRACE("probe done"); -- cgit v1.2.3