summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/gst-args.m426
-rw-r--r--m4/gst-glib2.m413
2 files changed, 28 insertions, 11 deletions
diff --git a/m4/gst-args.m4 b/m4/gst-args.m4
index b478c82..0628123 100644
--- a/m4/gst-args.m4
+++ b/m4/gst-args.m4
@@ -358,3 +358,29 @@ AC_DEFUN([AG_GST_ARG_DISABLE_FATAL_WARNINGS],
fi
])
])
+
+dnl Enable extra checks by default only for development versions
+AC_DEFUN([AG_GST_ARG_ENABLE_EXTRA_CHECKS],
+[
+ AC_ARG_ENABLE(extra-check,
+ AC_HELP_STRING([--enable-extra-checks],
+ [Enable extra runtime checks]),
+ [
+ case "${enableval}" in
+ yes) EXTRA_CHECKS=yes ;;
+ no) EXTRA_CHECKS=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-extra-checks) ;;
+ esac
+ ],
+ [
+ if test "x`expr $PACKAGE_VERSION_MINOR % 2`" = "x1" -a "x`expr $PACKAGE_VERSION_MICRO '<' 90`" = "x1"; then
+ EXTRA_CHECKS=yes
+ else
+ EXTRA_CHECKS=no
+ fi
+ ])
+
+ if test "x$EXTRA_CHECKS" = "xyes"; then
+ AC_DEFINE(GST_ENABLE_EXTRA_CHECKS, 1, [Define if extra runtime checks should be enabled])
+ fi
+])
diff --git a/m4/gst-glib2.m4 b/m4/gst-glib2.m4
index 5b9cd8b..5b72507 100644
--- a/m4/gst-glib2.m4
+++ b/m4/gst-glib2.m4
@@ -51,18 +51,9 @@ AC_DEFUN([AG_GST_GLIB_CHECK],
fi
AC_ARG_ENABLE(glib-asserts,
- AS_HELP_STRING([--enable-glib-asserts[=@<:@no/auto/yes@:>@]],
+ AS_HELP_STRING([--enable-glib-asserts[=@<:@no/yes@:>@]],
[Enable GLib assertion]),[enable_glib_assertions=$enableval],
- [enable_glib_assertions=auto])
-
- if test "x$enable_glib_assertions" = "xauto"; then
- dnl Enable assertions only for development versions
- if test "x`expr $PACKAGE_VERSION_MINOR % 2`" = "x1" -a "x`expr $PACKAGE_VERSION_MICRO '<' 90`" = "x1"; then
- enable_glib_assertions=yes
- else
- enable_glib_assertions=no
- fi
- fi
+ [enable_glib_assertions=yes])
if test "x$enable_glib_assertions" = "xno"; then
GLIB_EXTRA_CFLAGS="$GLIB_EXTRA_CFLAGS -DG_DISABLE_ASSERT"