gl: only enable gbm backend if gudev is available

gudev/gudev.h is included unconditionally, so only enable
the gbm backend if gudev was actually found. This also
matches the meson build behaviour.

Should fix build on GNOME SDK builder.
This commit is contained in:
Tim-Philipp Müller 2018-03-05 19:57:55 +00:00
parent 7d18a97273
commit 5f9c61e08f
2 changed files with 3 additions and 3 deletions

View file

@ -295,14 +295,14 @@ GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
AC_SUBST(GLIB_PREFIX)
AC_SUBST(GST_PREFIX)
AG_GST_GL_CHECKS
dnl check for gudev
PKG_CHECK_MODULES(G_UDEV, gudev-1.0 , [
AC_DEFINE([HAVE_GUDEV], 1, [Define if gudev is installed])
HAVE_GUDEV="yes" ],
[HAVE_GUDEV="no"])
AG_GST_GL_CHECKS
dnl GTK is optional and only used in examples
HAVE_GTK=no
HAVE_GTK_X11=no

View file

@ -176,7 +176,7 @@ case $host in
PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no)
AC_SUBST(DRM_CFLAGS)
AC_SUBST(DRM_LIBS)
if test "x$HAVE_DRM" = "xyes"; then
if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then
PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no)
AC_SUBST(GBM_CFLAGS)
AC_SUBST(GBM_LIBS)