Bug #5801: Check for MTRR support under Linux. Minor refactoring of MTRR

checks for other OSes.
This commit is contained in:
Daniel Stone 2006-04-01 21:20:31 +00:00
parent 978c7b14a1
commit 1e764feab5
2 changed files with 13 additions and 5 deletions

View File

@ -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.)

View File

@ -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