egl: Don't force X11 support when testing for EGL. Fixes building Wayland support on embedded systems without X11. (TODO: maybe move the EGL test out of the X11 tests at some point, too.)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/configure b/configure
index 4f0ffbd..e4f8e92 100755
--- a/configure
+++ b/configure
@@ -21775,6 +21775,7 @@ $as_echo_n "checking for EGL support... " >&6; }
#define LINUX
#define EGL_API_FB
+ #define MESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include <EGL/eglext.h>
diff --git a/configure.in b/configure.in
index fbe0583..95bef62 100644
--- a/configure.in
+++ b/configure.in
@@ -2340,6 +2340,7 @@ CheckOpenGLESX11()
AC_TRY_COMPILE([
#define LINUX
#define EGL_API_FB
+ #define MESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include <EGL/eglext.h>
],[
diff --git a/src/video/wayland/SDL_waylandvideo.h b/src/video/wayland/SDL_waylandvideo.h
index d173b28..0a7c310 100644
--- a/src/video/wayland/SDL_waylandvideo.h
+++ b/src/video/wayland/SDL_waylandvideo.h
@@ -33,7 +33,7 @@
!!! FIXME: in Ubuntu 18.04 (and other distros).
*/
-
+#define MESA_EGL_NO_X11_HEADERS
#include <EGL/egl.h>
#include "wayland-util.h"