Check for GStreamer plugins individually
authorPhilip Chimento <philip.chimento@gmail.com>
Mon, 31 Jan 2011 00:52:51 +0000 (01:52 +0100)
committerPhilip Chimento <philip.chimento@gmail.com>
Mon, 31 Jan 2011 00:52:51 +0000 (01:52 +0100)
In configure.ac, check for individual GStreamer plugins, instead of
requiring gstreamer-plugins-bad-0.10.pc. This is because Ubuntu doesn't
have a devel package for gstreamer-plugins-bad, and we don't actually
link against that library - we just dynamically open it.

configure.ac

index 5611efdf52df997dcfce8ba2be4c447d55e7d1a5..3a4364c91011322ca6255eaa14c8d99e046720ef 100644 (file)
@@ -114,7 +114,7 @@ AC_ARG_WITH([gstreamer],
 SOUND_MODULE=
 AS_IF([$TEST "x$with_gstreamer" != xno], 
        [AC_DEFINE([GSTREAMER_SOUND], [1], [Define to enable sound support with GStreamer])
-       SOUND_MODULE="gstreamer-0.10 >= 0.10.12 gstreamer-plugins-base-0.10 gstreamer-plugins-bad-0.10"])
+       SOUND_MODULE="gstreamer-0.10 >= 0.10.12"])
 
 ### CHECK FOR LIBRARIES #######################################################
 
@@ -135,6 +135,25 @@ PKG_CHECK_MODULES([TEST], [
        gmodule-2.0 >= $GLIB_REQUIRED_VERSION
 ])
 
+# GStreamer plugins needed to run library
+AS_IF([$TEST "x$with_gstreamer" != xno], [
+       m4_defun([AX_GST_REQUIRE_ELEMENT],
+               [AM_GST_ELEMENT_CHECK([$1],
+                       [],
+                       [AC_MSG_ERROR([GStreamer element $1 not found. You need to install gstreamer-plugins-m4_default([$2], [base]).])]
+               )]
+       )
+       AX_GST_REQUIRE_ELEMENT([giostreamsrc])
+       AX_GST_REQUIRE_ELEMENT([typefind])
+       AX_GST_REQUIRE_ELEMENT([audioconvert])
+       AX_GST_REQUIRE_ELEMENT([volume])
+       AX_GST_REQUIRE_ELEMENT([oggdemux])
+       AX_GST_REQUIRE_ELEMENT([vorbisdec])
+       AX_GST_REQUIRE_ELEMENT([autoaudiosink], [good])
+       AX_GST_REQUIRE_ELEMENT([aiffparse], [bad])
+       AX_GST_REQUIRE_ELEMENT([modplug], [bad])
+])
+
 # Plugin flags; include '-module' in each Makefile.am, because AC_SUBSTed
 # variables are black boxes to Automake, so it has to know about it being a
 # module in the makefile itself.