[Mesa-dev] [PATCH 1/2] build: fix EGL build when no X11 headers are present

Ross Burton ross.burton at intel.com
Thu Jun 27 04:35:07 PDT 2013

eglplatform.h defaults to X11 on Unix unless told otherwise, so if we're doing a
build without any X11 support tell it so that we don't try including headers
that don't exist.

Also set GL_PC_FLAGS so that the definition is in egl.pl, so that applications
using EGL don't try to pull in X11 headers on systems where EGL was configured
without X11 support.

Signed-off-by: Ross Burton <ross.burton at intel.com>

 configure.ac |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index 6832b0d..3a0cd77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1490,6 +1490,13 @@ AC_SUBST([EGL_NATIVE_PLATFORM])
+# If we don't have the X11 platform, set this define so we don't try to include
+# the X11 headers.
+if ! echo "$egl_platforms" | grep -q 'x11'; then
                     [directory for EGL drivers [[default=${libdir}/egl]]])],

More information about the mesa-dev mailing list