aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Sapountzis <[email protected]>2010-03-19 02:38:09 +0200
committerGeorge Sapountzis <[email protected]>2010-03-21 13:21:45 +0200
commit0b932284f2294a1dc02004d3b6ef6dfb633bc4bb (patch)
treed2a4bd954402c84f1ead40eba98034b9e62828e8
parent2b5a6e083c1e6e45757a2192721d8675309835c1 (diff)
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
-rw-r--r--include/GL/internal/dri_interface.h8
-rw-r--r--src/mesa/drivers/dri/swrast/Makefile2
2 files changed, 9 insertions, 1 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 1d4e82e154a..aa56eb45d79 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 cc59eefdb2d..aeefece4402 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