From 945a43139b558088e45f21628c8f31388b223025 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 23 Oct 2002 08:53:44 +0000 Subject: .m4 to check for presence of an element let me know if this works Original commit message from CVS: .m4 to check for presence of an element let me know if this works --- Makefile.am | 3 +++ gst-element-check.m4 | 20 ++++++++++++++++++++ gst-plugins.spec.in | 1 + 3 files changed, 24 insertions(+) create mode 100644 gst-element-check.m4 diff --git a/Makefile.am b/Makefile.am index 12232654..5852f46b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,6 +13,9 @@ endif pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = gstreamer-libs.pc +aclocaldir = $(datadir)/aclocal +aclocal_DATA = gst-element-check.m4 + SUBDIRS=gst-libs gst sys $(EXT_DIR) examples tools $(GCONF_DIR) testsuite DIST_SUBDIRS=gst-libs gst sys ext examples tools gconf testsuite diff --git a/gst-element-check.m4 b/gst-element-check.m4 new file mode 100644 index 00000000..f900dace --- /dev/null +++ b/gst-element-check.m4 @@ -0,0 +1,20 @@ +dnl Perform a check for a GStreamer element using gst-inspect +dnl Thomas Vander Stichele +dnl Last modification: 23/10/2002 + +dnl AM_GST_ELEMENT_CHECK(ELEMENT-NAME, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) + +AC_DEFUN(AM_GST_ELEMENT_CHECK, +[ + AC_CHECK_PROG(GST_INSPECT, gst-inspect, gst-inspect, []) + if test "x$GST_INSPECT" != "x"; then + AC_MSG_CHECKING(GStreamer element $1) + if [ $GST_INSPECT $1 > /dev/null 2> /dev/null ]; then + AC_MSG_RESULT(found.) + $2 + else + AC_MSG_RESULT(not found.) + $3 + fi + fi +]) diff --git a/gst-plugins.spec.in b/gst-plugins.spec.in index 627fb386..febb8059 100644 --- a/gst-plugins.spec.in +++ b/gst-plugins.spec.in @@ -124,6 +124,7 @@ GStreamer support libraries header files. %{_includedir}/gst-plugins-%{version}/gst/resample/resample.h %{_includedir}/gst-plugins-%{version}/gst/riff/riff.h %{_includedir}/gst-plugins-%{version}/gst/video/video.h +%{_datadir}/aclocal/gst-element-check.m4 %{_libdir}/pkgconfig/gstreamer-libs.pc # Here are all the packages depending on external libs # -- cgit v1.2.1