summaryrefslogtreecommitdiff
path: root/common/m4/gst-glib2.m4
diff options
context:
space:
mode:
Diffstat (limited to 'common/m4/gst-glib2.m4')
-rwxr-xr-xcommon/m4/gst-glib2.m425
1 files changed, 25 insertions, 0 deletions
diff --git a/common/m4/gst-glib2.m4 b/common/m4/gst-glib2.m4
new file mode 100755
index 0000000..3060e5e
--- /dev/null
+++ b/common/m4/gst-glib2.m4
@@ -0,0 +1,25 @@
+dnl check for a minimum version of GLib
+
+dnl AG_GST_GLIB_CHECK([minimum-version-required])
+
+AC_DEFUN([AG_GST_GLIB_CHECK],
+[
+ dnl Minimum required version of GLib
+ GLIB_REQ=[$1]
+ if test "x$GLIB_REQ" = "x"
+ then
+ AC_MSG_ERROR([Please specify a required version for GLib 2.0])
+ fi
+ AC_SUBST(GLIB_REQ)
+
+ dnl Check for glib with everything
+ AG_GST_PKG_CHECK_MODULES(GLIB,
+ glib-2.0 >= $GLIB_REQ gobject-2.0 gthread-2.0 gmodule-no-export-2.0)
+
+ if test "x$HAVE_GLIB" = "xno"; then
+ AC_MSG_ERROR([This package requires GLib >= $GLIB_REQ to compile.])
+ fi
+
+ dnl for the poor souls who for example have glib in /usr/local
+ AS_SCRUB_INCLUDE(GLIB_CFLAGS)
+])