diff options
author | Dave Airlie <airlied@redhat.com> | 2012-07-17 01:52:45 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-17 01:52:45 +0100 |
commit | 891ea02395079b1480faf701156185ad01405e6d (patch) | |
tree | 62e5c66e30aa140b1d18219697dcc2e2998f964e | |
parent | e4660be7c12de53cac57c0b7d4e792a071b4fcfc (diff) |
smi: fix build against XAA-less server
-rw-r--r-- | configure.ac | 17 | ||||
-rw-r--r-- | src/smi.h | 5 | ||||
-rw-r--r-- | src/smi_driver.c | 2 | ||||
-rw-r--r-- | src/smi_xaa.c | 10 |
4 files changed, 34 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7a80962..f5e1dfe 100644 --- a/configure.ac +++ b/configure.ac @@ -84,6 +84,23 @@ AM_CONDITIONAL(XMODES, test "x$XMODES" = xyes) if test "x$XMODES" = xyes; then AC_DEFINE(HAVE_XMODES, 1, [X server has new mode code]) fi +AC_ARG_ENABLE(xaa, + AS_HELP_STRING([--enable-xaa], + [Enable legacy X Acceleration Architecture (XAA) [default=auto]]), + [XAA="$enableval"], + [XAA=auto]) +if test "x$XAA" != xno; then + save_CFLAGS=$CFLAGS + save_CPPFLAGS=$CPPFLAGS + CFLAGS=$XORG_CFLAGS + CPPFLAGS="$XORG_CFLAGS" + AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no) + CFLAGS=$save_CFLAGS + CPPFLAGS=$save_CPPFLAGS +fi +AC_MSG_CHECKING([whether to include XAA support]) +AM_CONDITIONAL(XAA, test "x$XAA" = xyes) +AC_MSG_RESULT([$XAA]) AC_SUBST([moduledir]) @@ -49,7 +49,10 @@ authorization from the XFree86 Project and Silicon Motion. #include "fb.h" +#ifdef HAVE_XAA_H #include "xaa.h" +#endif +#include "xf86fbman.h" #include "exa.h" #include "xf86cmap.h" #include "xf86i2c.h" @@ -239,7 +242,9 @@ typedef struct printed using a counter */ Bool useBIOS; /* Use BIOS for mode sets */ +#ifdef HAVE_XAA_H XAAInfoRecPtr XAAInfoRec; /* XAA info Rec */ +#endif /* EXA */ ExaDriverPtr EXADriverPtr; diff --git a/src/smi_driver.c b/src/smi_driver.c index 25eb742..05d7202 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -1847,9 +1847,11 @@ SMI_CloseScreen(int scrnIndex, ScreenPtr pScreen) /* Restore console mode and unmap framebuffer */ SMI_LeaveVT(scrnIndex, 0); +#ifdef HAVE_XAA_H if (pSmi->XAAInfoRec != NULL) { XAADestroyInfoRec(pSmi->XAAInfoRec); } +#endif if (pSmi->EXADriverPtr) { exaDriverFini(pScreen); pSmi->EXADriverPtr = NULL; diff --git a/src/smi_xaa.c b/src/smi_xaa.c index f2c1cc6..95b5c95 100644 --- a/src/smi_xaa.c +++ b/src/smi_xaa.c @@ -32,6 +32,8 @@ authorization from the XFree86 Project and silicon Motion. #include "smi.h" #include "smi_501.h" +#ifdef HAVE_XAA_H + #include "miline.h" #include "xaalocal.h" #include "xaarop.h" @@ -62,9 +64,11 @@ static void SMI_SetupForImageWrite(ScrnInfoPtr, int, unsigned int, int, int, static void SMI_SubsequentImageWriteRect(ScrnInfoPtr, int, int, int, int, int); #endif +#endif Bool SMI_XAAInit(ScreenPtr pScreen) { +#ifdef HAVE_XAA_H XAAInfoRecPtr infoPtr; ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; SMIPtr pSmi = SMIPTR(pScrn); @@ -187,8 +191,13 @@ SMI_XAAInit(ScreenPtr pScreen) ret = XAAInit(pScreen, infoPtr); LEAVE(ret); +#else + return FALSE; +#endif } + +#ifdef HAVE_XAA_H /******************************************************************************/ /* Screen to Screen Copies */ /******************************************************************************/ @@ -720,3 +729,4 @@ SMI_SubsequentImageWriteRect(ScrnInfoPtr pScrn, int x, int y, int w, int h, LEAVE(); } #endif +#endif |