telepathy-salut: Remove support for --disable-debug

Simon McVittie smcv at kemper.freedesktop.org
Thu Feb 6 11:27:49 PST 2014


Module: telepathy-salut
Branch: master
Commit: 627e4b13e98aa6c1007c17b6ec3dcfef50ad81a2
URL:    http://cgit.freedesktop.org/telepathy/telepathy-salut/commit/?id=627e4b13e98aa6c1007c17b6ec3dcfef50ad81a2

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Fri Nov  1 16:19:33 2013 +0000

Remove support for --disable-debug

---

 Makefile.am               |    2 +-
 configure.ac              |    8 --------
 lib/gibber/gibber-debug.c |    4 ----
 lib/gibber/gibber-debug.h |   27 ---------------------------
 m4/salut-args.m4          |   19 -------------------
 src/debug.c               |    4 ----
 src/debug.h               |   21 ---------------------
 src/salut.c               |    2 --
 tests/debug.c             |    2 --
 9 files changed, 1 insertion(+), 88 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 9981d7e..588b968 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4
 
 SUBDIRS = tools extensions lib src data m4 salut plugins tests docs
 
-DISTCHECK_CONFIGURE_FLAGS = --disable-debug --enable-gtk-doc
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
 
 valgrind:
 	cd tests && $(MAKE) valgrind
diff --git a/configure.ac b/configure.ac
index 47699d5..4905120 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,6 @@ AM_PROG_AS
 AC_PROG_MKDIR_P
 
 dnl add common command line switches
-SALUT_ARG_DEBUG
 SALUT_ARG_VALGRIND
 SALUT_ARG_COVERAGE
 
@@ -90,13 +89,6 @@ TP_COMPILER_WARNINGS([ERROR_CFLAGS], [test "x$enable_fatal_warnings" = xyes],
    unused-parameter])
 AC_SUBST([ERROR_CFLAGS])
 
-AC_ARG_ENABLE([debug],
-      [AC_HELP_STRING([--disable-debug], [compile without debug code])],
-      [], [enable_debug=yes])
-
-AS_IF([test x$enable_debug = xyes],
-  [AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])])
-
 dnl Check for code generation tools
 XSLTPROC=
 AC_CHECK_PROGS([XSLTPROC], [xsltproc])
diff --git a/lib/gibber/gibber-debug.c b/lib/gibber/gibber-debug.c
index 69d2488..bf26d45 100644
--- a/lib/gibber/gibber-debug.c
+++ b/lib/gibber/gibber-debug.c
@@ -5,8 +5,6 @@
 
 #include <glib.h>
 
-#ifdef ENABLE_DEBUG
-
 static DebugFlags flags = 0;
 static gboolean initialized = FALSE;
 
@@ -95,5 +93,3 @@ gibber_debug_stanza (DebugFlags flag,
       g_free (node_str);
     }
 }
-
-#endif
diff --git a/lib/gibber/gibber-debug.h b/lib/gibber/gibber-debug.h
index c7ec260..9f919d2 100644
--- a/lib/gibber/gibber-debug.h
+++ b/lib/gibber/gibber-debug.h
@@ -10,8 +10,6 @@
 
 G_BEGIN_DECLS
 
-#ifdef ENABLE_DEBUG
-
 typedef enum
 {
   DEBUG_TRANSPORT         = 1 << 0,
@@ -51,31 +49,6 @@ void gibber_debug_stanza (DebugFlags flag, WockyStanza *stanza,
 
 #endif /* DEBUG_FLAG */
 
-#else /* ENABLE_DEBUG */
-
-#ifdef DEBUG_FLAG
-
-static inline void
-DEBUG (
-    const gchar *format,
-    ...)
-{
-}
-
-static inline void
-DEBUG_STANZA (
-    WockyStanza *stanza,
-    const gchar *format,
-    ...)
-{
-}
-
-#define DEBUGGING 0
-
-#endif /* DEBUG_FLAG */
-
-#endif /* ENABLE_DEBUG */
-
 G_END_DECLS
 
 #endif
diff --git a/m4/salut-args.m4 b/m4/salut-args.m4
index f95ad9d..6e5944c 100644
--- a/m4/salut-args.m4
+++ b/m4/salut-args.m4
@@ -1,27 +1,8 @@
 dnl configure-time options for Telepathy Salut
 
-dnl SALUT_ARG_DEBUG
 dnl SALUT_ARG_VALGRIND
 dnl SALUT_ARG_COVERAGE
 
-AC_DEFUN([SALUT_ARG_DEBUG],
-[
-  dnl debugging stuff
-  AC_ARG_ENABLE(debug,
-    AC_HELP_STRING([--disable-debug],[compile without debug code]),
-    [
-      case "${enableval}" in
-        yes|no) enable="${enableval}" ;;
-        *)   AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
-      esac
-    ],
-    [enable=yes])
-
-  if test "$enable" = yes; then
-    AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
-  fi
-])
-
 AC_DEFUN([SALUT_ARG_VALGRIND],
 [
   dnl valgrind inclusion
diff --git a/src/debug.c b/src/debug.c
index 365cb7d..2315cc5 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -13,8 +13,6 @@
 
 #include <telepathy-glib/telepathy-glib.h>
 
-#ifdef ENABLE_DEBUG
-
 static DebugFlags flags = 0;
 
 GDebugKey keys[] = {
@@ -138,5 +136,3 @@ void debug (DebugFlags flag,
 
   g_free (message);
 }
-
-#endif /* ENABLE_DEBUG */
diff --git a/src/debug.h b/src/debug.h
index 9e97ed3..f3e80d3 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -8,8 +8,6 @@
 
 #include <wocky/wocky.h>
 
-#ifdef ENABLE_DEBUG
-
 typedef enum
 {
   DEBUG_PRESENCE       = 1 << 0,
@@ -52,25 +50,6 @@ void debug_free (void);
 
 #endif /* DEBUG_FLAG */
 
-#else /* ENABLE_DEBUG */
-
-#ifdef DEBUG_FLAG
-
-static inline void
-DEBUG (
-    const gchar *format,
-    ...)
-{
-}
-
-#define DEBUGGING 0
-
-#endif /* DEBUG_FLAG */
-
-#define debug_free() G_STMT_START { } G_STMT_END
-
-#endif /* ENABLE_DEBUG */
-
 G_END_DECLS
 
 #endif
diff --git a/src/salut.c b/src/salut.c
index f61c29f..17d8537 100644
--- a/src/salut.c
+++ b/src/salut.c
@@ -59,13 +59,11 @@ main (int argc, char **argv)
   fatal_mask |= G_LOG_LEVEL_CRITICAL;
   g_log_set_always_fatal (fatal_mask);
 
-#ifdef ENABLE_DEBUG
   tp_debug_divert_messages (g_getenv ("SALUT_LOGFILE"));
   debug_set_flags_from_env ();
 
   if (g_getenv ("SALUT_PERSIST"))
     tp_debug_set_persistent (TRUE);
-#endif
 
   loader = salut_plugin_loader_dup ();
 
diff --git a/tests/debug.c b/tests/debug.c
index cef4515..941a297 100644
--- a/tests/debug.c
+++ b/tests/debug.c
@@ -23,13 +23,11 @@ main (int argc, char **argv)
   g_type_init ();
   g_set_prgname ("telepathy-salut");
 
-#ifdef ENABLE_DEBUG
   tp_debug_divert_messages (g_getenv ("SALUT_LOGFILE"));
   debug_set_flags_from_env ();
 
   if (g_getenv ("SALUT_PERSIST"))
     tp_debug_set_persistent (TRUE);
-#endif
 
   return tp_run_connection_manager ("telepathy-salut", VERSION,
                                     salut_create_connection_manager,



More information about the telepathy-commits mailing list