If the Xlib headers are not installed, a special macro must
be defined before including EGL headers.
#define GL_GLEXT_PROTOTYPES
+#if !defined(HAVE_ECORE_X_XLIB) && !defined(MESA_EGL_NO_X11_HEADERS)
+# define MESA_EGL_NO_X11_HEADERS
+#endif
+
#ifdef BUILD_ENGINE_GL_COCOA
# include <OpenGL/gl.h>
# include <OpenGL/glext.h>
# define EGL_EGLEXT_PROTOTYPES
# define GL_GLEXT_PROTOTYPES
+# if !defined(HAVE_ECORE_X_XLIB) && !defined(MESA_EGL_NO_X11_HEADERS)
+# define MESA_EGL_NO_X11_HEADERS
+# endif
+
# include <EGL/egl.h>
# include <EGL/eglext.h>
# include <EGL/eglmesaext.h>
# define GL_GLEXT_PROTOTYPES
+# if !defined(HAVE_ECORE_X_XLIB) && !defined(MESA_EGL_NO_X11_HEADERS)
+# define MESA_EGL_NO_X11_HEADERS
+# endif
+
# include <EGL/egl.h>
# include <GLES2/gl2.h>
# include <GLES2/gl2ext.h>