From d6c8b851036e6431b083730a5273c71574972563 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 2 Feb 2001 16:31:20 +0000 Subject: [PATCH] autoconfiscate FB_AUX_VGA_PLANES_VGA4, FB_AUX_VGA_PLANES_CFB4 and FB_AUX_VGA_PLANES_CFB8 --- acconfig.h | 9 +++++++++ configure.in | 26 ++++++++++++++++++++++++++ source/fbset.c | 12 +++++++++--- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/acconfig.h b/acconfig.h index 0087683..cfbfb03 100644 --- a/acconfig.h +++ b/acconfig.h @@ -109,5 +109,14 @@ /* Define this if you have fnmatch.h */ #undef HAVE_FNMATCH_H +/* Define this if you have FB_AUX_VGA_PLANES_VGA4 */ +#undef HAVE_FB_AUX_VGA_PLANES_VGA4 + +/* Define this if you have FB_AUX_VGA_PLANES_VGA4 */ +#undef HAVE_FB_AUX_VGA_PLANES_CFB4 + +/* Define this if you have FB_AUX_VGA_PLANES_VGA4 */ +#undef HAVE_FB_AUX_VGA_PLANES_CFB8 + @BOTTOM@ #endif // __config_h_ diff --git a/configure.in b/configure.in index 434399b..672e2a7 100644 --- a/configure.in +++ b/configure.in @@ -391,6 +391,32 @@ if test "x$HAVE_FBDEV" != xno; then AC_CHECK_HEADER(linux/fb.h, HAVE_FBDEV=yes, HAVE_FBDEV=no) fi AC_SUBST(HAVE_FBDEV) +if test "x$HAVE_FBDEV" = xyes; then + AC_MSG_CHECKING(for FB_AUX_VGA_PLANES_VGA4) + AC_TRY_COMPILE( + [#include "linux/fb.h"], + [int foo = FB_AUX_VGA_PLANES_VGA4;], + AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_VGA4) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + AC_MSG_CHECKING(for FB_AUX_VGA_PLANES_CFB4) + AC_TRY_COMPILE( + [#include "linux/fb.h"], + [int foo = FB_AUX_VGA_PLANES_CFB4;], + AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_CFB4) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) + AC_MSG_CHECKING(for FB_AUX_VGA_PLANES_CFB8) + AC_TRY_COMPILE( + [#include "linux/fb.h"], + [int foo = FB_AUX_VGA_PLANES_CFB8;], + AC_DEFINE(HAVE_FB_AUX_VGA_PLANES_CFB8) + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + ) +fi dnl Checks for SVGALib support AC_ARG_WITH(svga, diff --git a/source/fbset.c b/source/fbset.c index db8f4ff..582152f 100644 --- a/source/fbset.c +++ b/source/fbset.c @@ -153,9 +153,15 @@ static struct textentry { }; static struct textentry VGAModes[] = { -// { FB_AUX_VGA_PLANES_VGA4, "VGA 16 colors in 4 planes" }, -// { FB_AUX_VGA_PLANES_CFB4, "VGA 16 colors in 1 plane" }, -// { FB_AUX_VGA_PLANES_CFB8, "VGA 256 colors in 4 planes" }, +#ifdef HAVE_FB_AUX_VGA_PLANES_VGA4 + { FB_AUX_VGA_PLANES_VGA4, "VGA 16 colors in 4 planes" }, +#endif +#ifdef HAVE_FB_AUX_VGA_PLANES_CFB4 + { FB_AUX_VGA_PLANES_CFB4, "VGA 16 colors in 1 plane" }, +#endif +#ifdef HAVE_FB_AUX_VGA_PLANES_CFB8 + { FB_AUX_VGA_PLANES_CFB8, "VGA 256 colors in 4 planes" }, +#endif /* last entry has name == NULL */ { 0, NULL} };