From 1e764feab595b781dab22d6e41c26f118c9d41b5 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 1 Apr 2006 21:20:31 +0000 Subject: [PATCH] Bug #5801: Check for MTRR support under Linux. Minor refactoring of MTRR checks for other OSes. --- ChangeLog | 2 ++ configure.ac | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff79c5fad..324f59aea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ Unconditionally run the XP_USE_FREETYPE AM_CONDITIONAL, not just in the Xprint-only path. Make AC_ARG_ENABLE for freetype and AC_ARG_WITH for freetype-config conditional also. + Bug #5801: Check for MTRR support under Linux. Minor refactoring of + the code checking this for other OSes. (To those wondering about the date: Yes, this is me doing an Xprint commit, but it fixes the --disable-xprint path, so.) diff --git a/configure.ac b/configure.ac index 7e49a7c3e..10909428e 100644 --- a/configure.ac +++ b/configure.ac @@ -118,18 +118,24 @@ AC_CHECK_HEADERS([linux/fb.h], FBDEV=yes) AM_CONDITIONAL(FBDEVHW, [test "x$FBDEV" = xyes]) dnl MTRR header -AC_CHECK_HEADERS([asm/mtrr.h]) +AC_CHECK_HEADERS([asm/mtrr.h], ac_cv_asm_mtrr_h=yes) +if test "x$ac_cv_asm_mtrr_h" = xyes; then + HAVE_MTRR=yes +fi dnl BSD MTRR header AC_CHECK_HEADERS([sys/memrange.h], ac_cv_memrange_h=yes) if test "x$ac_cv_memrange_h" = xyes; then - AC_DEFINE(HAS_MTRR_SUPPORT, 1, [Define to 1 if BSD MTRR support is - available]) + HAVE_MTRR=yes +fi + +if test "x$HAVE_MTRR" = xyes; then + AC_DEFINE(HAS_MTRR_SUPPORT, 1, [MTRR support available]) fi dnl A NetBSD MTRR header -AC_CHECK_HEADERS([machine/mtrr.h], ac_cv_mtrr_h=yes) -if test "x$ac_cv_mtrr_h" = xyes; then +AC_CHECK_HEADERS([machine/mtrr.h], ac_cv_machine_mtrr_h=yes) +if test "x$ac_cv_machine_mtrr_h" = xyes; then AC_DEFINE(HAS_MTRR_BUILTIN, 1, [Define to 1 if NetBSD built-in MTRR support is available]) fi