diff options
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/sna/Makefile.am | 2 | ||||
-rw-r--r-- | src/sna/sna_driver.c | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 2c407607..3fd28b0f 100644 --- a/configure.ac +++ b/configure.ac @@ -175,7 +175,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_xserver_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES]) PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.23]) PKG_CHECK_MODULES(DRI, [xf86driproto], , DRI=no) -PKG_CHECK_MODULES(DRI2, [dri2proto >= 2.6]) +PKG_CHECK_MODULES(DRI2, [dri2proto >= 2.6],, DRI2=no) PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10]) sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` @@ -218,6 +218,10 @@ else AC_MSG_ERROR([DRI requested but prerequisites not found]) fi fi +AM_CONDITIONAL(DRI2, test x$DRI2 != xno) +if test "x$DRI2" != "xno"; then + AC_DEFINE(USE_DRI2,1,[Enable DRI2 driver support]) +fi if test "$XVMC" = yes; then PKG_CHECK_MODULES(XVMCLIB, diff --git a/src/sna/Makefile.am b/src/sna/Makefile.am index 30cedc6a..65e85bfa 100644 --- a/src/sna/Makefile.am +++ b/src/sna/Makefile.am @@ -74,7 +74,7 @@ libsna_la_SOURCES = \ gen7_render.h \ $(NULL) -if DRI +if DRI2 libsna_la_SOURCES += \ sna_dri.c \ $(NULL) diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index 19413a9c..4c9f298b 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -925,7 +925,7 @@ sna_screen_init(int scrnIndex, ScreenPtr screen, int argc, char **argv) xf86DPMSInit(screen, xf86DPMSSet, 0); sna_video_init(sna, screen); -#ifdef DRI2 +#if USE_DRI2 sna->directRenderingOpen = sna_dri_open(sna, screen); if (sna->directRenderingOpen) xf86DrvMsg(scrn->scrnIndex, X_INFO, |