From 877b0034884fe74098f3269ca6040fcbfaf924e2 Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Fri, 18 Jul 2008 15:53:33 -0300 Subject: [PATCH] Remove dependency on cfb8_32. This probably was not noticed because gint_driver.c doesn't include the proper header file. --- configure.ac | 1 + src/glint_driver.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/configure.ac b/configure.ac index 238e5b7..d5b242b 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,7 @@ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" AC_CHECK_DECL(XSERVER_LIBPCIACCESS, [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no], [#include "xorg-server.h"]) +AC_CHECK_HEADER(cfb8_32.h,[AC_DEFINE(HAVE_CFB8_32, 1, [Have cfb8_32 support])],[]) CPPFLAGS="$SAVE_CPPFLAGS" # Checks for header files. diff --git a/src/glint_driver.c b/src/glint_driver.c index 47127f9..5be3f3a 100644 --- a/src/glint_driver.c +++ b/src/glint_driver.c @@ -2885,7 +2885,9 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; GLINTPtr pGlint = GLINTPTR(pScrn); int ret, displayWidth; +#if HAVE_CFB8_32 int init_picture = 0; +#endif unsigned char *FBStart; VisualPtr visual; @@ -3003,10 +3005,14 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) case 8: case 16: case 24: +#if !HAVE_CFB8_32 + case 32: +#endif ret = fbScreenInit(pScreen, FBStart, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, displayWidth, pScrn->bitsPerPixel); +#if HAVE_CFB8_32 init_picture = 1; break; case 32: @@ -3022,6 +3028,7 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) displayWidth, pScrn->bitsPerPixel); init_picture = 1; } +#endif break; default: xf86DrvMsg(scrnIndex, X_ERROR, @@ -3059,7 +3066,9 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } /* must be after RGB ordering fixed */ +#if HAVE_CFB8_32 if (init_picture) +#endif fbPictureInit(pScreen, 0, 0); if (!pGlint->NoAccel) { switch (pGlint->Chipset) @@ -3188,11 +3197,13 @@ GLINTScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } } +#if HAVE_CFB8_32 if((pScrn->overlayFlags & OVERLAY_8_32_PLANAR) && (pScrn->bitsPerPixel == 32)) { if(!xf86Overlay8Plus32Init(pScreen)) return FALSE; } +#endif if(pGlint->ShadowFB) ShadowFBInit(pScreen, GLINTRefreshArea); -- 1.5.6