1 From a1b59ca6b1781442f37ffc1b697635db126b3a22 Mon Sep 17 00:00:00 2001
2 From: Carlos Rafael Giani <dv@pseudoterminal.org>
3 Date: Thu, 19 Jul 2018 10:30:54 +0200
4 Subject: [PATCH] gl: Add switch for explicitely enabling/disabling GBM support
6 Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=796833]
8 Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
10 m4/gst-gl.m4 | 30 ++++++++++++++++++++++++++++--
11 1 file changed, 28 insertions(+), 2 deletions(-)
13 diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4
14 index 1e9724094..aca5295cc 100644
17 @@ -117,6 +117,15 @@ AC_ARG_ENABLE([dispmanx],
18 *) AC_MSG_ERROR([bad value ${enableval} for --enable-dispmanx]) ;;
19 esac],[NEED_DISPMANX=auto])
22 + [ --enable-gbm Enable Mesa3D GBM support (requires EGL) @<:@default=auto@:>@],
23 + [case "${enableval}" in
24 + yes) NEED_GBM=yes ;;
26 + auto) NEED_GBM=auto ;;
27 + *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;;
28 + esac],[NEED_GBM=auto])
30 AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb)
31 save_CPPFLAGS="$CPPFLAGS"
33 @@ -172,15 +181,32 @@ case $host in
34 AC_CHECK_LIB([EGL], [fbGetDisplay], [HAVE_VIV_FB_EGL=yes])
37 - if test "x$HAVE_EGL" = "xyes"; then
38 + if test "x$NEED_GBM" != "xno"; then
39 + if test "x$HAVE_EGL" = "xyes"; then
40 PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no)
43 + if test "x$NEED_GBM" = "xyes"; then
44 + if test "x$HAVE_DRM" = "xno"; then
45 + AC_MSG_ERROR([GBM support requested but libdrm is not available])
47 + if test "x$HAVE_GUDEV" = "xno"; then
48 + AC_MSG_ERROR([GBM support requested but gudev is not available])
51 if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then
52 PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no)
53 + if test "x$HAVE_GBM_EGL" = "xno" -a "x$NEED_GBM" = "xyes"; then
54 + AC_MSG_ERROR([GBM support requested but gbm library is not available])
60 + elif test "x$NEED_GBM" = "xyes"; then
61 + AC_MSG_ERROR([GBM support requested but EGL is not available])
63 + AC_MSG_NOTICE([GBM support requested but EGL is not available; not enabling GBM support])
67 dnl FIXME: Mali EGL depends on GLESv1 or GLESv2