summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-06-27 12:35:07 +0100
committerChad Versace <chad.versace@linux.intel.com>2013-07-01 10:06:11 -0700
commit1a7275de9a0088cedab17131eec82bd2cada26c3 (patch)
treed05e38abdbeb7d57e17eea1116d1d3c57955a068
parentacc6a141b8976d0615e03c4530b64cefdb1aa199 (diff)
build: fix EGL build when no X11 headers are present
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.pc, so that applications using EGL don't try to pull in X11 headers on systems where EGL was configured without X11 support. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64959 Signed-off-by: Ross Burton <ross.burton@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6832b0d8973..3a0cd7791d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1490,6 +1490,13 @@ AC_SUBST([EGL_NATIVE_PLATFORM])
AC_SUBST([EGL_PLATFORMS])
AC_SUBST([EGL_CFLAGS])
+# 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
+ DEFINES="$DEFINES -DMESA_EGL_NO_X11_HEADERS"
+ GL_PC_CFLAGS="$GL_PC_CFLAGS -DMESA_EGL_NO_X11_HEADERS"
+fi
+
AC_ARG_WITH([egl-driver-dir],
[AS_HELP_STRING([--with-egl-driver-dir=DIR],
[directory for EGL drivers [[default=${libdir}/egl]]])],