autotools: fix build if OpenGL support is not available

https://bugzilla.gnome.org/show_bug.cgi?id=793039
This commit is contained in:
Tim-Philipp Müller 2018-01-31 13:02:07 +00:00
parent f6cb16ab8c
commit bd37da2de4

View file

@ -198,31 +198,34 @@ AG_GST_PKG_CHECK_MODULES(GST_AUDIO, gstreamer-audio-[$GST_API_VERSION], [$GST_RE
AG_GST_PKG_CHECK_MODULES(GST_PBUTILS, gstreamer-pbutils-[$GST_API_VERSION], [$GST_REQ], yes)
AG_GST_PKG_CHECK_MODULES(GST_GL, gstreamer-gl-[$GST_API_VERSION], [$GST_REQ], no)
AC_MSG_CHECKING([GStreamer OpenGL window systems ...])
GST_GL_WINSYS=`$PKG_CONFIG --variable=gl_winsys gstreamer-gl-1.0`
AC_MSG_RESULT([$GST_GL_WINSYS])
GST_GL_HAVE_WINDOW_X11=""
GST_GL_HAVE_WINDOW_WAYLAND=""
GST_GL_HAVE_WINDOW_ANDROID=""
GST_GL_HAVE_WINDOW_COCOA=""
GST_GL_HAVE_WINDOW_EAGL=""
case "$GST_GL_WINSYS" in *x11*) GST_GL_HAVE_WINDOW_X11="1" ;; esac
case "$GST_GL_WINSYS" in *wayland*) GST_GL_HAVE_WINDOW_WAYLAND="1" ;; esac
case "$GST_GL_WINSYS" in *android*) GST_GL_HAVE_WINDOW_ANDROID="1" ;; esac
case "$GST_GL_WINSYS" in *cocoa*) GST_GL_HAVE_WINDOW_COCOA="1" ;; esac
case "$GST_GL_WINSYS" in *eagl*) GST_GL_HAVE_WINDOW_EAGL="1" ;; esac
if test "x$HAVE_GST_GL" = "xyes"; then
AC_MSG_CHECKING([GStreamer OpenGL platforms ...])
GST_GL_PLATFORMS=`$PKG_CONFIG --variable=gl_platforms gstreamer-gl-1.0`
AC_MSG_RESULT([$GST_GL_PLATFORMS])
GST_GL_HAVE_PLATFORM_GLX=""
GST_GL_HAVE_PLATFORM_EGL=""
GST_GL_HAVE_PLATFORM_CGL=""
GST_GL_HAVE_PLATFORM_EAGL=""
case "$GST_GL_PLATFORMS" in *glx*) GST_GL_HAVE_PLATFORM_GLX="1" ;; esac
case "$GST_GL_PLATFORMS" in *egl*) GST_GL_HAVE_PLATFORM_EGL="1" ;; esac
case "$GST_GL_PLATFORMS" in *cgl*) GST_GL_HAVE_PLATFORM_CGL="1" ;; esac
case "$GST_GL_PLATFORMS" in *eagl*) GST_GL_HAVE_PLATFORM_EAGL="1" ;; esac
AC_MSG_CHECKING([GStreamer OpenGL window systems ...])
GST_GL_WINSYS=`$PKG_CONFIG --variable=gl_winsys gstreamer-gl-1.0`
AC_MSG_RESULT([$GST_GL_WINSYS])
GST_GL_HAVE_WINDOW_X11=""
GST_GL_HAVE_WINDOW_WAYLAND=""
GST_GL_HAVE_WINDOW_ANDROID=""
GST_GL_HAVE_WINDOW_COCOA=""
GST_GL_HAVE_WINDOW_EAGL=""
case "$GST_GL_WINSYS" in *x11*) GST_GL_HAVE_WINDOW_X11="1" ;; esac
case "$GST_GL_WINSYS" in *wayland*) GST_GL_HAVE_WINDOW_WAYLAND="1" ;; esac
case "$GST_GL_WINSYS" in *android*) GST_GL_HAVE_WINDOW_ANDROID="1" ;; esac
case "$GST_GL_WINSYS" in *cocoa*) GST_GL_HAVE_WINDOW_COCOA="1" ;; esac
case "$GST_GL_WINSYS" in *eagl*) GST_GL_HAVE_WINDOW_EAGL="1" ;; esac
AC_MSG_CHECKING([GStreamer OpenGL platforms ...])
GST_GL_PLATFORMS=`$PKG_CONFIG --variable=gl_platforms gstreamer-gl-1.0`
AC_MSG_RESULT([$GST_GL_PLATFORMS])
GST_GL_HAVE_PLATFORM_GLX=""
GST_GL_HAVE_PLATFORM_EGL=""
GST_GL_HAVE_PLATFORM_CGL=""
GST_GL_HAVE_PLATFORM_EAGL=""
case "$GST_GL_PLATFORMS" in *glx*) GST_GL_HAVE_PLATFORM_GLX="1" ;; esac
case "$GST_GL_PLATFORMS" in *egl*) GST_GL_HAVE_PLATFORM_EGL="1" ;; esac
case "$GST_GL_PLATFORMS" in *cgl*) GST_GL_HAVE_PLATFORM_CGL="1" ;; esac
case "$GST_GL_PLATFORMS" in *eagl*) GST_GL_HAVE_PLATFORM_EAGL="1" ;; esac
fi
AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
@ -1921,17 +1924,15 @@ AG_GST_CHECK_FEATURE(RSVG, [rsvg decoder], rsvg, [
])
dnl *** gl ***
HAVE_GL="no"
translit(dnm, m, l) AM_CONDITIONAL(USE_GL, true)
AG_GST_CHECK_FEATURE(GL, [gl elements], gl, [
if test "x$HAVE_GST_GL" = "xyes"; then
HAVE_GL="yes"
else
HAVE_GL="no"
fi
dnl if test x"$USE_OPENGL" = x"yes" -o x"$USE_GLES2" = x"yes"; then
dnl HAVE_GL="yes"
dnl fi
])
AM_CONDITIONAL(USE_GL, test "x$HAVE_GL" = "xyes")
dnl FIXME
AM_CONDITIONAL(USE_OPENGL, false)