aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/wlr/config.h.in2
-rw-r--r--include/wlr/render/egl.h4
-rw-r--r--meson.build5
3 files changed, 11 insertions, 0 deletions
diff --git a/include/wlr/config.h.in b/include/wlr/config.h.in
index 94273fac..a7691ff9 100644
--- a/include/wlr/config.h.in
+++ b/include/wlr/config.h.in
@@ -1,6 +1,8 @@
#ifndef WLR_CONFIG_H
#define WLR_CONFIG_H
+#mesondefine WLR_HAS_EGLMESAEXT_H
+
#mesondefine WLR_HAS_LIBCAP
#mesondefine WLR_HAS_SYSTEMD
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h
index 50432887..c810b08e 100644
--- a/include/wlr/render/egl.h
+++ b/include/wlr/render/egl.h
@@ -16,10 +16,14 @@
#define EGL_NO_X11
#endif
+#include <wlr/config.h>
+
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#if WLR_HAS_EGLMESAEXT_H
// TODO: remove eglmesaext.h
#include <EGL/eglmesaext.h>
+#endif
#include <pixman.h>
#include <stdbool.h>
#include <wayland-server-core.h>
diff --git a/meson.build b/meson.build
index 1a160208..a6dad5d6 100644
--- a/meson.build
+++ b/meson.build
@@ -86,6 +86,7 @@ conf_data.set10('WLR_HAS_X11_BACKEND', false)
conf_data.set10('WLR_HAS_XWAYLAND', false)
conf_data.set10('WLR_HAS_XCB_ERRORS', false)
conf_data.set10('WLR_HAS_XCB_ICCCM', false)
+conf_data.set10('WLR_HAS_EGLMESAEXT_H', false)
# Clang complains about some zeroed initializer lists (= {0}), even though they
# are valid
@@ -109,6 +110,10 @@ pixman = dependency('pixman-1')
math = cc.find_library('m')
rt = cc.find_library('rt')
+if cc.has_header('EGL/eglmesaext.h', dependencies: egl)
+ conf_data.set10('WLR_HAS_EGLMESAEXT_H', true)
+endif
+
wlr_files = []
wlr_deps = [
wayland_server,