summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/mesa/0001-Add-MESA_EGL_NO_X11_HEADERS-to-defines.patch
blob: c66bf17f09814fa8f0ce8525387c39d0a05fd0be (plain)
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
38
39
40
41
From 63d5b4ec7a5853bbbae2e1963d406bb09e77dd60 Mon Sep 17 00:00:00 2001
From: Valentin Popa <valentin.popa@intel.com>
Date: Thu, 27 Feb 2014 10:32:17 +0200
Subject: [PATCH] Add MESA_EGL_NO_X11_HEADERS to defines

MESA_EGL_NO_X11_HEADERS is used in eglplatform.h
but the preprocessor doesn't know about it.
Define MESA_EGL_NO_X11_HEADERS for builds without
x11 in DISTRO_FEATURES.

Backport from 9.2.5.

Upstream-Status: Backport

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
---
 configure.ac | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index 2acf579..a1a8487 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1568,6 +1568,14 @@ 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]]])],
-- 
1.8.3.2