summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-02-23 15:44:50 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2018-02-23 16:05:50 +0000
commitce8cbdbe064f5fd7f3e78b6349fa86604e6189d7 (patch)
tree8b497a038caebc24a74c64d0d8ebc596c9b081fe /src
parentbaa75c4a92bff37cb742a8c3ad42ab93e4f2a3d6 (diff)
downloadlibepoxy-ce8cbdbe064f5fd7f3e78b6349fa86604e6189d7.tar.gz
Allow building Epoxy without X11
Epoxy can be compiled with GLX and X11 native resources on EGL. We can disable the former, but the latter is always built in when enabling EGL support. Some platforms do not support X11 at all, so we need a way to disable X11 when configuring Epoxy.
Diffstat (limited to 'src')
-rw-r--r--src/dispatch_common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dispatch_common.h b/src/dispatch_common.h
index 28135c7..9675cff 100644
--- a/src/dispatch_common.h
+++ b/src/dispatch_common.h
@@ -46,6 +46,13 @@
#include "epoxy/glx.h"
#endif
#if PLATFORM_HAS_EGL
+# if !ENABLE_X11
+/* Mesa uses this symbol to avoid including X11 headers when including
+ * EGL.h; since X11 was explicitly disabled at configuration time, we
+ * should do the same
+ */
+# define MESA_EGL_NO_X11_HEADERS 1
+# endif
#include "epoxy/egl.h"
#endif
#if PLATFORM_HAS_WGL