From: George Sapountzis Date: Fri, 19 Mar 2010 00:38:09 +0000 (+0200) Subject: dri_inteface: add define for checking presence of drm.h X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b932284f2294a1dc02004d3b6ef6dfb633bc4bb;p=mesa.git 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 --- 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 #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