From 659102e04a7111895cde506e5e3c9e118b0a81f6 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Wed, 15 Apr 2009 23:12:11 +0300 Subject: [PATCH] gstdebug: show enabled/disabled in configure and fix build for disabled When its disabled, we poison some symbols to force a build error if they are used. Dunno how useful this acually is, but we need to disable the poisoning when we include this ourself. Also don't define some of the dummies, as they are getting replaced with defines and that creates code that does not compile. --- configure.ac | 2 ++ gst/gstinfo.c | 30 +----------------------------- gst/gstinfo.h | 2 +- 3 files changed, 4 insertions(+), 30 deletions(-) diff --git a/configure.ac b/configure.ac index 6d5e0ce660..65a70066fd 100644 --- a/configure.ac +++ b/configure.ac @@ -732,6 +732,7 @@ sed \ AC_OUTPUT dnl negate for output +if test "x${GST_DISABLE_GST_DEBUG}" = "xno"; then enable_gst_debug="yes"; fi if test "x${GST_DISABLE_LOADSAVE}" = "xno"; then enable_loadsave="yes"; fi if test "x${GST_DISABLE_PARSE}" = "xno"; then enable_parse="yes"; fi if test "x${GST_DISABLE_OPTION_PARSING}" = "xno"; then enable_option_parsing="yes"; fi @@ -754,6 +755,7 @@ Configuration Documentation (manuals) : ${enable_docbook} Documentation (API) : ${enable_gtk_doc} + Debug Logging : ${enable_gst_debug} Pipeline XML load/save : ${enable_loadsave} Command-line parser : ${enable_parse} Option parsing in gst_init : ${enable_option_parsing} diff --git a/gst/gstinfo.c b/gst/gstinfo.c index f13b4e93f5..6d50478b92 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -85,6 +85,7 @@ * categories. These are explained at GST_DEBUG_CATEGORY_INIT(). */ +#define GST_INFO_C #include "gst_private.h" #include "gstinfo.h" @@ -1564,24 +1565,6 @@ gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level, { } -const gchar * -gst_debug_message_get (GstDebugMessage * message) -{ - return ""; -} - -gchar * -gst_debug_construct_term_color (guint colorinfo) -{ - return g_strdup (""); -} - -gint -gst_debug_construct_win_color (guint colorinfo) -{ - return 0; -} - void gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, const gchar * file, const gchar * function, gint line, @@ -1589,17 +1572,6 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level, { } -const gchar * -gst_debug_level_get_name (GstDebugLevel level) -{ - return ""; -} - -void -gst_debug_add_log_function (GstLogFunction func, gpointer data) -{ -} - guint gst_debug_remove_log_function (GstLogFunction func) { diff --git a/gst/gstinfo.h b/gst/gstinfo.h index c84e78fe58..dcefc8b78c 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -1089,7 +1089,7 @@ G_CONST_RETURN gchar * #else /* GST_DISABLE_GST_DEBUG */ -#if defined(__GNUC__) && __GNUC__ >= 3 +#if !defined(GST_INFO_C) && defined(__GNUC__) && __GNUC__ >= 3 # pragma GCC poison gst_debug_log # pragma GCC poison gst_debug_log_valist # pragma GCC poison _gst_debug_category_new