summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--m4/spice-deps.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index 57d5b78..bb58d0f 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -207,3 +207,23 @@ AC_DEFUN([SPICE_CHECK_LZ4], [
AC_DEFINE(USE_LZ4, [1], [Define to build with lz4 support])
fi
])
+
+
+# SPICE_CHECK_GSTREAMER(VAR, version, packages-to-check-for, [action-if-found, [action-if-not-found]])
+# ---------------------
+# Checks whether the specified GStreamer modules are present and sets the
+# corresponding autoconf variables and preprocessor definitions.
+# ---------------------
+AC_DEFUN([SPICE_CHECK_GSTREAMER], [
+ AS_VAR_PUSHDEF([have_gst],[have_]m4_tolower([$1]))dnl
+ PKG_CHECK_MODULES([$1], [$3],
+ [have_gst="yes"
+ AC_SUBST(AS_TR_SH([[$1]_CFLAGS]))
+ AC_SUBST(AS_TR_SH([[$1]_LIBS]))
+ AS_VAR_APPEND([SPICE_REQUIRES], [" $3"])
+ AC_DEFINE(AS_TR_SH([HAVE_$1]), [1], [Define if supporting GStreamer $2])
+ $4],
+ [have_gst="no"
+ $5])
+ AS_VAR_POPDEF([have_gst])dnl
+])