From: Stefan Kost Date: Wed, 15 Dec 2010 12:51:06 +0000 (+0200) Subject: gst-glib2: add a enable-glib-asserts configure flag X-Git-Tag: upstream/20130618~68^2~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=169462a62f8b3cb91d721092af13530a3f72a462;p=platform%2Fupstream%2Fgst-common.git gst-glib2: add a enable-glib-asserts configure flag We're also running some explesive checks and these can nowbe disabled conviniently for end-user builds. --- diff --git a/m4/gst-glib2.m4 b/m4/gst-glib2.m4 index 1305cda..bafba41 100644 --- a/m4/gst-glib2.m4 +++ b/m4/gst-glib2.m4 @@ -38,7 +38,7 @@ AC_DEFUN([AG_GST_GLIB_CHECK], [enable_gobject_cast_checks=auto]) if test "x$enable_gobject_cast_checks" = "xauto"; then - dnl For releases, turn off the cast checks checks + dnl For releases, turn off the cast checks if test "x$PACKAGE_VERSION_NANO" = "x1"; then enable_gobject_cast_checks=yes else @@ -50,6 +50,24 @@ AC_DEFUN([AG_GST_GLIB_CHECK], GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_CAST_CHECKS" fi + AC_ARG_ENABLE(glib-asserts, + AS_HELP_STRING([--enable-glib-asserts[=@<:@no/auto/yes@:>@]], + [Enable GLib assertion]),, + [enable_glib_assertions=auto]) + + if test "x$enable_glib_assertions" = "xauto"; then + dnl For releases, turn off the assertions + if test "x$PACKAGE_VERSION_NANO" = "x1"; then + enable_glib_assertions=yes + else + enable_glib_assertions=no + fi + fi + + if test "x$enable_glib_assertions" = "xno"; then + GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_ASSERT" + fi + dnl for the poor souls who for example have glib in /usr/local AS_SCRUB_INCLUDE(GLIB_CFLAGS) ])