From 64a7dcc11386f0582b028084ed2de05245b33778 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 14 Jan 2009 11:09:36 +1000 Subject: dri2: only build if server supports it --- src/nouveau_dri2.c | 4 +++- src/nv_driver.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) 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)) -- cgit v1.2.1