Module: Mesa
Branch: master
Commit: 0b932284f2294a1dc02004d3b6ef6dfb633bc4bb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b932284f2294a1dc02004d3b6ef6dfb633bc4bb

Author: George Sapountzis <[email protected]>
Date:   Fri Mar 19 02:38:09 2010 +0200

dri_inteface: add define for checking presence of drm.h

__NOT_HAVE_DRM_H is a like a feature, defined by default on specific platforms
and allows to be defined externally as well.

__NOT_HAVE_DRM_H should only be used by xserver and mesa swrast_dri drivers

---

 include/GL/internal/dri_interface.h  |    8 +++++++-
 src/mesa/drivers/dri/swrast/Makefile |    2 ++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/include/GL/internal/dri_interface.h 
b/include/GL/internal/dri_interface.h
index 1d4e82e..aa56eb4 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -41,7 +41,13 @@
 #define DRI_INTERFACE_H
 
 /* For archs with no drm.h */
-#if !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__GNU__)
+#if defined(__APPLE__) || defined(__CYGWIN__) || defined(__GNU__)
+#ifndef __NOT_HAVE_DRM_H
+#define __NOT_HAVE_DRM_H
+#endif
+#endif
+
+#ifndef __NOT_HAVE_DRM_H
 #include <drm.h>
 #else
 typedef unsigned int drm_context_t;
diff --git a/src/mesa/drivers/dri/swrast/Makefile 
b/src/mesa/drivers/dri/swrast/Makefile
index cc59eef..aeefece 100644
--- a/src/mesa/drivers/dri/swrast/Makefile
+++ b/src/mesa/drivers/dri/swrast/Makefile
@@ -5,6 +5,8 @@ include $(TOP)/configs/current
 
 LIBNAME = swrast_dri.so
 
+DRIVER_DEFINES = -D__NOT_HAVE_DRM_H
+
 DRIVER_SOURCES = \
        swrast.c \
        swrast_span.c

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to