summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2009-01-14 11:09:36 +1000
committerBen Skeggs <skeggsb@gmail.com>2009-01-14 11:09:36 +1000
commit64a7dcc11386f0582b028084ed2de05245b33778 (patch)
tree5ba42dc5d12b989210cbd20b11d84fe4e3a49803
parent28568062e3cc08e0dea44d63a2248c40b371e704 (diff)
downloadxorg-driver-xf86-video-nouveau-ng.tar.gz
dri2: only build if server supports itng
-rw-r--r--src/nouveau_dri2.c4
-rw-r--r--src/nv_driver.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c
index 8c1f289..69d9b04 100644
--- a/src/nouveau_dri2.c
+++ b/src/nouveau_dri2.c
@@ -1,3 +1,5 @@
+#include "xorg-server.h"
+#ifdef DRI2
#include "nv_include.h"
#include "dri2.h"
@@ -126,4 +128,4 @@ nouveau_dri2_takedown(ScreenPtr pScreen)
{
DRI2CloseScreen(pScreen);
}
-
+#endif
diff --git a/src/nv_driver.c b/src/nv_driver.c
index 01bd471..741f8cb 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -27,6 +27,7 @@
#include "xf86int10.h"
#include "xf86drm.h"
+#include "xorg-server.h"
/*
* Forward definitions for the functions that make up the driver.
@@ -1951,7 +1952,9 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
/* First init DRI/DRM */
if (!NVDRIScreenInit(pScrn))
return FALSE;
+#ifdef DRI2
nouveau_dri2_init(pScreen);
+#endif
/* Allocate and map memory areas we need */
if (!NVMapMem(pScrn))