summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2014-12-02 11:31:47 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2014-12-09 16:40:25 +0100
commitf9e0a644aebb6cb6caa2c624f9afd2835ab6834f (patch)
tree41a78cb80af098c4b6971957796060b2cd08b6df /m4
parentdd57d05a523746af54557e4cf5a9768ebe029d77 (diff)
downloadspice-common-f9e0a644aebb6cb6caa2c624f9afd2835ab6834f.tar.gz
spice-common-f9e0a644aebb6cb6caa2c624f9afd2835ab6834f.tar.xz
spice-common-f9e0a644aebb6cb6caa2c624f9afd2835ab6834f.zip
build-sys: Move opus check to m4 macro
Diffstat (limited to 'm4')
-rw-r--r--m4/spice-deps.m418
1 files changed, 18 insertions, 0 deletions
diff --git a/m4/spice-deps.m4 b/m4/spice-deps.m4
index 443718b..6816e23 100644
--- a/m4/spice-deps.m4
+++ b/m4/spice-deps.m4
@@ -80,3 +80,21 @@ AC_DEFUN([SPICE_CHECK_CELT051], [
AS_VAR_APPEND([$1_CFLAGS], [" $CELT051_CFLAGS"])
AS_VAR_APPEND([$1_LIBS], [" $CELT051_LIBS"])
])
+
+
+# SPICE_CHECK_OPUS(PREFIX)
+# ------------------------
+# Check for the availability of Opus. If found, it will append the flags to use
+# to the $PREFIX_CFLAGS and $PREFIX_LIBS variables, and it will define a
+# HAVE_OPUS preprocessor symbol as well as a HAVE_OPUS Makefile conditional.
+#-------------------------
+AC_DEFUN([SPICE_CHECK_OPUS], [
+ PKG_CHECK_MODULES([OPUS], [opus >= 0.9.14], [have_opus=yes], [have_opus=no])
+
+ AM_CONDITIONAL([HAVE_OPUS], [test "x$have_opus" = "xyes"])
+ if test "x$have_opus" = "xyes" ; then
+ AC_DEFINE([HAVE_OPUS], [1], [Define if we have OPUS])
+ fi
+ AS_VAR_APPEND([$1_CFLAGS], [" $OPUS_CFLAGS"])
+ AS_VAR_APPEND([$1_LIBS], [" $OPUS_LIBS"])
+])