gst-glib2.m4 696 Bytes
Newer Older
1
dnl check for a minimum version of GLib
2

3
dnl GST_GLIB_CHECK([minimum-version-required])
4

5
6
7
8
AC_DEFUN([GST_GLIB_CHECK],
[
  dnl Minimum required version of GLib
  GLIB_REQ=[$1]
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
9
10
11
12
  if test "x$GLIB_REQ" = "x"
  then
    AC_MSG_ERROR([Please specify a required version for [GST_GLIB_CHECK]])
  fi
13
14
15
16
  AC_SUBST(GLIB_REQ)

  dnl Check for glib with everything
  PKG_CHECK_MODULES(GLIB,
17
    glib-2.0 >= $GLIB_REQ gobject-2.0 gthread-2.0 gmodule-no-export-2.0,
18
19
20
    HAVE_GLIB=yes,HAVE_GLIB=no)

  if test "x$HAVE_GLIB" = "xno"; then
21
    AC_MSG_ERROR([This package requires GLib >= $GLIB_REQ to compile.])
22
23
24
25
  fi

  dnl for the poor souls who for example have glib in /usr/local
  AS_SCRUB_INCLUDE(GLIB_CFLAGS)
26
])