diff --git a/render/meson.build b/render/meson.build index 8c71ff07..7c125407 100644 --- a/render/meson.build +++ b/render/meson.build @@ -27,6 +27,20 @@ internal_config.set10('HAVE_EVENTFD', cc.has_header('sys/eventfd.h')) if 'gles2' in renderers or 'auto' in renderers egl = dependency('egl', required: 'gles2' in renderers) + if egl.found() + eglext_version = cc.get_define( + 'EGL_EGLEXT_VERSION', + dependencies: egl, + prefix: '#include ', + ).to_int() + if eglext_version < 20210604 + egl = dependency( + '', + required: 'gles2' in renderers, + not_found_message: 'EGL headers too old', + ) + endif + endif gbm = dependency('gbm', required: 'gles2' in renderers) if egl.found() and gbm.found() wlr_deps += [egl, gbm]