-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])
-])
+AS_CASE([$with_sound],
+ [gstreamer0.10], [
+ have_all_elements=yes
+ m4_ifdef([AM_GST_ELEMENT_CHECK], [
+ m4_map_args_w([
+ giostreamsrc
+ typefind
+ audioconvert
+ volume
+ oggdemux
+ vorbisdec
+ autoaudiosink
+ aiffparse
+ modplug],
+ [AM_GST_ELEMENT_CHECK(], [, [], [have_all_elements=no])])
+ AS_IF([test "x$have_all_elements" = "xno"],
+ [AC_MSG_ERROR([One or more required GStreamer elements were not found.
+You will have to install your system's "base", "good", and "bad" plugins
+pacakges. Try looking for names such as: gstreamer-plugins-base,
+gstreamer-plugins-good, gstreamer-plugins-bad-free,
+gstreamer-plugins-bad-free-extras, gstreamer0.10-plugins-base,
+gstreamer0.10-plugins-good, gstreamer0.10-plugins-bad])])],
+ [AC_MSG_ERROR([AM_GST_ELEMENT_CHECK not found. Install the development package
+for GStreamer 0.10 and rerun autogen.sh.])])
+ ],
+ [gstreamer1.0], [dnl aiffparse is currently broken in Fedora 19
+ have_all_elements=yes
+ m4_ifdef([GST_ELEMENT_CHECK], [
+ m4_map_args_w([
+ giostreamsrc
+ typefind
+ audioconvert
+ volume
+ oggdemux
+ vorbisdec
+ autoaudiosink
+ modplug],
+ [GST_ELEMENT_CHECK(], [, [1.0], [], [have_all_elements=no])])
+ AS_IF([test "x$have_all_elements" = "xno"],
+ [AC_MSG_ERROR([One or more required GStreamer elements were not found.
+You will have to install your system's "base", "good", and "bad" plugins
+packages. Try looking for names such as: gstreamer1-plugins-base,
+gstreamer1-plugins-good, gstreamer1-plugins-bad-free,
+gstreamer1-plugins-bad-free-extras, gstreamer1.0-plugins-base,
+gstreamer1.0-plugins-good, gstreamer1.0-plugins-bad])])],
+ [AC_MSG_ERROR([GST_ELEMENT_CHECK not found. Install the development package
+for GStreamer 1.0 and rerun autogen.sh.])])
+ ],
+ [])