diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-04-09 08:17:45 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-04-09 11:17:36 +0200 |
commit | fc8586793dc45a343772c1e25bf8dd45bbb64210 (patch) | |
tree | d0c88b98031f09c3036d9bf2018036ef374c87c8 | |
parent | 6eeb3c423ca5702bf1bd660b7c826b835b735286 (diff) |
gst-glib2.m4: Add configure parameter to disable GObject type checks
...and disable them by default for pre-releases and releases.
Fixes bug #612540.
-rw-r--r-- | m4/gst-glib2.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/gst-glib2.m4 b/m4/gst-glib2.m4 index 7b03874..ddf5e40 100644 --- a/m4/gst-glib2.m4 +++ b/m4/gst-glib2.m4 @@ -4,6 +4,8 @@ dnl AG_GST_GLIB_CHECK([minimum-version-required]) AC_DEFUN([AG_GST_GLIB_CHECK], [ + AC_REQUIRE([AS_NANO]) + dnl Minimum required version of GLib GLIB_REQ=[$1] if test "x$GLIB_REQ" = "x" @@ -25,6 +27,24 @@ AC_DEFUN([AG_GST_GLIB_CHECK], dnl when using threading primitives) GLIB_CFLAGS="$GLIB_CFLAGS -DG_THREADS_MANDATORY" + AC_ARG_ENABLE(gobject-cast-checks, + AS_HELP_STRING([--enable-gobject-cast-checks[=@<:@no/auto/yes@:>@]], + [Enable GObject cast checks]),, + [enable_gobject_cast_checks=auto]) + + if test "x$enable_gobject_cast_checks" = "xauto"; then + dnl For releases, turn off the cast checks checks + if test "x$PACKAGE_VERSION_NANO" = "x1"; then + enable_gobject_cast_checks=yes + else + enable_gobject_cast_checks=no + fi + fi + + if test "x$enable_gobject_cast_checks" = "xno"; then + GLIB_CFLAGS="$GLIB_CFLAGS -DG_DISABLE_CAST_CHECKS" + fi + dnl for the poor souls who for example have glib in /usr/local AS_SCRUB_INCLUDE(GLIB_CFLAGS) ]) |