configure: improve GStreamer API version checks.

This commit is contained in:
Gwenole Beauchesne 2013-03-20 14:43:46 +01:00
parent 4dd6035dac
commit 8602c0459d

View file

@ -19,9 +19,9 @@ m4_define([glib_version], [2.28])
# gstreamer version number
m4_define([gst_api_version], [0.10])
m4_define([gst_version], [0.10.36])
m4_define([gst_plugins_base_version], [0.10.31])
m4_define([gst_plugins_bad_version], [0.10.22])
m4_define([gst0_version], [0.10.36])
m4_define([gst0_plugins_base_version], [0.10.31])
m4_define([gst0_plugins_bad_version], [0.10.22])
# Wayland minimum version number
m4_define([wayland_api_version], [1.0.0])
@ -69,16 +69,6 @@ AC_SUBST(LIBVA_PACKAGE_VERSION)
WAYLAND_API_VERSION=wayland_api_version
AC_SUBST(WAYLAND_API_VERSION)
dnl Versions for GStreamer and plugins-base
GST_API_VERSION=gst_api_version
GST_VERSION_REQUIRED=gst_version
GST_PLUGINS_BASE_VERSION_REQUIRED=gst_plugins_base_version
GST_PLUGINS_BAD_VERSION_REQUIRED=gst_plugins_bad_version
AC_SUBST(GST_API_VERSION)
AC_SUBST(GST_VERSION_REQUIRED)
AC_SUBST(GST_PLUGINS_BASE_VERSION_REQUIRED)
AC_SUBST(GST_PLUGINS_BAD_VERSION_REQUIRED)
dnl Use pretty build output with automake >= 1.11
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [
AM_DEFAULT_VERBOSITY=1
@ -137,9 +127,28 @@ dnl ---------------------------------------------------------------------------
dnl -- GStreamer --
dnl ---------------------------------------------------------------------------
dnl Versions for GStreamer and plugins-base
GST_API_VERSION=gst_api_version
case $GST_API_VERSION in
0.10)
GST_VERSION_REQUIRED=gst0_version
GST_PLUGINS_BASE_VERSION_REQUIRED=gst0_plugins_base_version
GST_PLUGINS_BAD_VERSION_REQUIRED=gst0_plugins_bad_version
;;
*)
AC_MSG_ERROR([unsupported GStreamer API version $GST_API_VERSION])
;;
esac
AC_SUBST(GST_API_VERSION)
AC_SUBST(GST_VERSION_REQUIRED)
AC_SUBST(GST_PLUGINS_BASE_VERSION_REQUIRED)
AC_SUBST(GST_PLUGINS_BAD_VERSION_REQUIRED)
dnl GStreamer Core
PKG_CHECK_MODULES([GST], [gstreamer-$GST_API_VERSION >= gst_version])
PKG_CHECK_MODULES([GST_BASE], [gstreamer-base-$GST_API_VERSION >= gst_version])
PKG_CHECK_MODULES([GST],
[gstreamer-$GST_API_VERSION >= $GST_VERSION_REQUIRED])
PKG_CHECK_MODULES([GST_BASE],
[gstreamer-base-$GST_API_VERSION >= $GST_VERSION_REQUIRED])
AC_CACHE_CHECK([for GstBaseSink::query hook], ac_cv_have_gst_base_sink_query, [
saved_CPPFLAGS="$CPPFLAGS"
@ -162,13 +171,13 @@ fi
dnl GStreamer -base plugins
PKG_CHECK_MODULES([GST_PLUGINS_BASE],
[gstreamer-plugins-base-$GST_API_VERSION >= gst_plugins_base_version])
[gstreamer-plugins-base-$GST_API_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
PKG_CHECK_MODULES([GST_INTERFACES],
[gstreamer-interfaces-$GST_API_VERSION >= gst_plugins_base_version])
[gstreamer-interfaces-$GST_API_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
dnl ... GstVideoOverlayComposition (gstreamer-video)
PKG_CHECK_MODULES([GST_VIDEO],
[gstreamer-video-$GST_API_VERSION >= gst_plugins_base_version])
[gstreamer-video-$GST_API_VERSION >= $GST_PLUGINS_BASE_VERSION_REQUIRED])
AC_CACHE_CHECK([for GstVideoOverlayComposition],
ac_cv_have_gst_video_overlay_composition, [
@ -247,11 +256,11 @@ AM_CONDITIONAL([USE_LOCAL_GST_VIDEO_DECODER],
dnl GStreamer -bad plugins
PKG_CHECK_MODULES([GST_BASEVIDEO],
[gstreamer-basevideo-$GST_API_VERSION >= gst_plugins_bad_version])
[gstreamer-basevideo-$GST_API_VERSION >= $GST_PLUGINS_BAD_VERSION_REQUIRED])
dnl ... bitstream parsers
PKG_CHECK_MODULES([GST_CODEC_PARSERS],
[gstreamer-codecparsers-$GST_API_VERSION >= gst_plugins_bad_version])
[gstreamer-codecparsers-$GST_API_VERSION >= $GST_PLUGINS_BAD_VERSION_REQUIRED])
dnl ... MPEG-2 parser, with the required extensions
AC_CACHE_CHECK([for MPEG-2 parser],
@ -637,6 +646,7 @@ AS_IF([test $USE_WAYLAND -eq 1], [VIDEO_OUTPUTS="$VIDEO_OUTPUTS wayland"])
echo
echo $PACKAGE configuration summary:
echo
echo GStreamer API version ............ : $GST_API_VERSION
echo VA-API version ................... : $VA_VERSION_STR
echo Video outputs .................... : $VIDEO_OUTPUTS
echo