summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2013-11-01 16:19:33 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-11-01 16:19:33 +0000
commit627e4b13e98aa6c1007c17b6ec3dcfef50ad81a2 (patch)
tree59cfb03ea3aed5aaa989a2b33f79fbbc9d105a14
parent822ddd064c266345ab4fe19c4b574a4cd29d7159 (diff)
Remove support for --disable-debug
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac8
-rw-r--r--lib/gibber/gibber-debug.c4
-rw-r--r--lib/gibber/gibber-debug.h27
-rw-r--r--m4/salut-args.m419
-rw-r--r--src/debug.c4
-rw-r--r--src/debug.h21
-rw-r--r--src/salut.c2
-rw-r--r--tests/debug.c2
9 files changed, 1 insertions, 88 deletions
diff --git a/Makefile.am b/Makefile.am
index 9981d7e3..588b9685 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 47699d50..49051208 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 69d24884..bf26d457 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 c7ec2603..9f919d28 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 f95ad9df..6e5944c6 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 365cb7d8..2315cc52 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 9e97ed3d..f3e80d3b 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 f61c29fe..17d85370 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 cef4515b..941a297d 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,