summaryrefslogtreecommitdiff
path: root/src/wsfb_driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wsfb_driver.c')
-rw-r--r--src/wsfb_driver.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/wsfb_driver.c b/src/wsfb_driver.c
index 0d6246b..bb33a79 100644
--- a/src/wsfb_driver.c
+++ b/src/wsfb_driver.c
@@ -60,8 +60,12 @@
#include "dgaproc.h"
/* for visuals */
-#include "xf1bpp.h"
-#include "xf4bpp.h"
+#ifdef HAVE_XF1BPP
+# include "xf1bpp.h"
+#endif
+#ifdef HAVE_XF4BPP
+# include "xf4bpp.h"
+#endif
#include "fb.h"
#include "xf86Resources.h"
@@ -637,14 +641,18 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags)
/* Load bpp-specific modules */
switch(pScrn->bitsPerPixel) {
+#ifdef HAVE_XF1BPP
case 1:
mod = "xf1bpp";
reqSym = "xf1bppScreenInit";
break;
+#endif
+#ifdef HAVE_XF4BPP
case 4:
mod = "xf4bpp";
reqSym = "xf4bppScreenInit";
break;
+#endif
default:
mod = "fb";
break;
@@ -828,17 +836,21 @@ WsfbScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
switch (pScrn->bitsPerPixel) {
case 1:
+#ifdef HAVE_XF1BPP
ret = xf1bppScreenInit(pScreen, fPtr->fbstart,
pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi,
pScrn->displayWidth);
break;
+#endif
case 4:
+#ifdef HAVE_XF4BPP
ret = xf4bppScreenInit(pScreen, fPtr->fbstart,
pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi,
pScrn->displayWidth);
break;
+#endif
case 8:
case 16:
case 24: