From 41738ca83b63c911e6b90f1dbce748830282031b Mon Sep 17 00:00:00 2001 From: Lubosz Sarnecki Date: Fri, 2 Oct 2015 13:31:39 +0200 Subject: [PATCH] build: Add dmabuf build condition. configure.ac: Build dmabuf when EGL and drm_fourcc.h is available. gl: Link gst-allocators. https://bugzilla.gnome.org/show_bug.cgi?id=743345 --- configure.ac | 15 +++++++++++++++ gst-libs/gst/gl/Makefile.am | 1 + 2 files changed, 16 insertions(+) diff --git a/configure.ac b/configure.ac index 0119ec2246..7334de5a1f 100644 --- a/configure.ac +++ b/configure.ac @@ -813,6 +813,21 @@ else fi fi +dnl check for DMABUF support +HAVE_DRM_FOURCC_HEADER=no +AC_CHECK_HEADER(libdrm/drm_fourcc.h, + HAVE_DRM_FOURCC_HEADER=yes, ) + +HAVE_GST_ALLOCATORS=no +PKG_CHECK_MODULES(GST_ALLOCATORS, gstreamer-allocators-1.0, + HAVE_GST_ALLOCATORS=yes, ) + +if test "x$HAVE_DRM_FOURCC_HEADER" = "xyes" -a \ + "x$HAVE_GST_ALLOCATORS" = "xyes" -a \ + "x$HAVE_EGL" = "xyes"; then + AC_DEFINE(GST_GL_HAVE_DMABUF, [1] , [DMABUF available for gl plugins]) +fi + dnl check if we can include both GL and GLES2 at the same time if test "x$HAVE_GL" = "xyes" -a "x$HAVE_GLES2" = "xyes"; then GL_INCLUDES=" diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am index be0e4b6b6e..edc1370f98 100644 --- a/gst-libs/gst/gl/Makefile.am +++ b/gst-libs/gst/gl/Makefile.am @@ -114,6 +114,7 @@ endif if USE_EGL SUBDIRS += egl libgstgl_@GST_API_VERSION@_la_LIBADD += egl/libgstgl-egl.la +libgstgl_@GST_API_VERSION@_la_LIBADD += -lgstallocators-$(GST_API_VERSION) endif configexecincludedir = $(libdir)/gstreamer-@GST_API_VERSION@/include/gst/gl