diff options
author | Max Krummenacher <max.oss.09@gmail.com> | 2020-06-28 22:51:22 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-30 16:41:08 +0100 |
commit | c1e8ee26dbaf77b3bdd362014f744ead88007f29 (patch) | |
tree | edb0f8598da007ae31e34a3f1a54570dac1d38c9 /meta/recipes-graphics/cogl | |
parent | 9694fcffd9824f11d25f909e10603979ecc338ac (diff) | |
download | openembedded-core-contrib-c1e8ee26dbaf77b3bdd362014f744ead88007f29.tar.gz |
cogl-1.0: cope with missing x11 headers
Fix commit 3e96efc4dd87 ("cogl-1.0: : don't require eglmesaext.h") if
x11 headers are missing.
In that case AC_CHECK_HEADERS will report the egl headers missing, as
by default on unix it builds for X11 as the platform but the compiler
will fail to find the X11 headers.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Tested-by: Andrey Zhizhikin <andrey.z@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/cogl')
-rw-r--r-- | meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch b/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch index 16ab2d7797..328984a63f 100644 --- a/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch +++ b/meta/recipes-graphics/cogl/cogl-1.0/0001-configure.ac-don-t-require-eglmesaext.h.patch @@ -1,4 +1,4 @@ -From ca94946110f4aaeeb0cbc75e11a619b21f295056 Mon Sep 17 00:00:00 2001 +From bb9765a926588ebfe1eb324fbbe8fc22d419eebe Mon Sep 17 00:00:00 2001 From: Max Krummenacher <max.krummenacher@toradex.com> Date: Thu, 25 Jun 2020 11:27:40 +0000 Subject: [PATCH] configure.ac: don't require eglmesaext.h @@ -15,11 +15,11 @@ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/cogl/-/merge_requests/28] Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> --- - configure.ac | 36 +++++++++++++++++------------------- - 1 file changed, 17 insertions(+), 19 deletions(-) + configure.ac | 51 ++++++++++++++++++++++++++++++++------------------- + 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/configure.ac b/configure.ac -index 12798e9f..f7fa40e2 100644 +index b7ba95d..0d1d8de 100644 --- a/configure.ac +++ b/configure.ac @@ -1212,22 +1212,6 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"], @@ -45,29 +45,44 @@ index 12798e9f..f7fa40e2 100644 AC_CHECK_LIB(EGL, [eglInitialize], [COGL_EXTRA_LDFLAGS="$COGL_EXTRA_LDFLAGS -lEGL"], [AC_MSG_ERROR([Unable to locate required EGL library])]) -@@ -1236,9 +1220,23 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"], +@@ -1236,9 +1220,38 @@ AS_IF([test "x$NEED_EGL" = "xyes" && test "x$EGL_CHECKED" != "xyes"], ] ) - COGL_EGL_INCLUDES="#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <EGL/eglmesaext.h>" ++dnl Test for the existence of egl headers. ++dnl egl*.h includes eglplatform.h which on __unix__ defaults to a X11 platform. ++dnl In that case AC_CHECK_HEADERS failes if X11 headers are not available. ++dnl Set the usual include guard define and, if the EGL implementation doesn't ++dnl use that guard fall back to USE_OZONE and EGL_NO_X11 platforms which don't ++dnl require additional headers. + AC_CHECK_HEADERS( + [EGL/egl.h], + [COGL_EGL_INCLUDES="#include <EGL/egl.h>"], -+ [AC_MSG_ERROR([Unable to locate required EGL headers])]) ++ [AC_MSG_ERROR([Unable to locate required EGL headers])], ++ [#define __egl_h_ ++ #define USE_OZONE ++ #define EGL_NO_X11]) + AC_CHECK_HEADERS( + [EGL/eglext.h], + [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES +#include <EGL/eglext.h>"], + [AC_MSG_ERROR([Unable to locate required EGL headers])], -+ [$COGL_EGL_INCLUDES]) ++ [#define __eglext_h_ ++ #define USE_OZONE ++ #define EGL_NO_X11 ++$COGL_EGL_INCLUDES]) + AC_CHECK_HEADERS( + [EGL/eglmesaext.h], + [COGL_EGL_INCLUDES="$COGL_EGL_INCLUDES +#include <EGL/eglmesaext.h>"], + [], -+ [$COGL_EGL_INCLUDES]) ++ [#define __eglmesaext_h_ ++#define USE_OZONE ++#define EGL_NO_X11 ++$COGL_EGL_INCLUDES]) + AC_SUBST([COGL_EGL_INCLUDES]) ]) |