diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-06-28 21:29:29 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2010-06-28 21:29:29 +0200 |
commit | cfacbc598926df16e17b37eccbe13e5a712a2d51 (patch) | |
tree | ca4687fdcca82a9142e01912be1c9acd7dd6dd97 | |
parent | e43cf499d0df41eb6ca2a1a7c21af71e31207635 (diff) |
Rationalise and fix KMS enable/disable configure option
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | 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"); |