gstdebug: show enabled/disabled in configure and fix build for disabled
authorStefan Kost <ensonic@users.sf.net>
Wed, 15 Apr 2009 20:12:11 +0000 (23:12 +0300)
committerStefan Kost <ensonic@users.sf.net>
Wed, 15 Apr 2009 20:35:35 +0000 (23:35 +0300)
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
gst/gstinfo.c
gst/gstinfo.h

index 6d5e0ce..65a7006 100644 (file)
@@ -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}
index f13b4e9..6d50478 100644 (file)
@@ -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)
 {
index c84e78f..dcefc8b 100644 (file)
@@ -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