summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2011-11-09 00:32:27 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2011-11-09 00:35:39 +0000
commit63d592ed74618734d69438c770d6462efeb5ab9d (patch)
tree4940c6e8c01f25a623aa7f5f4b06ff4e121db1e4
parente4a9407a51803016bab9918b03e2034981886bdb (diff)
downloadgstreamer-common-63d592ed74618734d69438c770d6462efeb5ab9d.tar.gz
m4: add AG_GST_CHECK_GST_DEBUG_DISABLED
-rw-r--r--m4/gst-feature.m430
1 files changed, 30 insertions, 0 deletions
diff --git a/m4/gst-feature.m4 b/m4/gst-feature.m4
index c8e5343..c072c79 100644
--- a/m4/gst-feature.m4
+++ b/m4/gst-feature.m4
@@ -218,7 +218,37 @@ AC_DEFUN([AG_GST_PARSE_SUBSYSTEM_DISABLES],
AG_GST_PARSE_SUBSYSTEM_DISABLE($1,XML)
])
+dnl AG_GST_CHECK_GST_DEBUG_DISABLED(ACTION-IF-DISABLED, ACTION-IF-NOT-DISABLED)
+dnl
+dnl Checks if the GStreamer debugging system is disabled in the core version
+dnl we are compiling against (by checking gstconfig.h)
+dnl
+AC_DEFUN([AG_GST_CHECK_GST_DEBUG_DISABLED],
+[
+ AC_REQUIRE([AG_GST_CHECK_GST])
+
+ AC_MSG_CHECKING([whether the GStreamer debugging system is enabled])
+ AC_LANG_PUSH([C])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$GST_CFLAGS $CFLAGS"
+ AC_COMPILE_IFELSE([
+ #include <gst/gstconfig.h>
+ #ifdef GST_DISABLE_GST_DEBUG
+ #error "debugging disabled, make compiler fail"
+ #endif], [ debug_system_enabled=yes], [debug_system_enabled=no])
+ CFLAGS="$save_CFLAGS"
+ AC_LANG_POP([C])
+ AC_MSG_RESULT([$debug_system_enabled])
+
+ if test "x$debug_system_enabled" = "xyes" ; then
+ $2
+ true
+ else
+ $1
+ true
+ fi
+])
dnl relies on GST_PLUGINS_ALL, GST_PLUGINS_SELECTED, GST_PLUGINS_YES,
dnl GST_PLUGINS_NO, and BUILD_EXTERNAL