From c6176c0e80d1c6e7029c0ffbaa9dfdbeec73f6ed Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Mon, 28 Mar 2011 10:33:13 +0200 Subject: [PATCH] Fix --disable-debug --- configure.ac | 5 ++++- libgitg/Makefile.am | 5 ++++- libgitg/gitg-debug.h | 2 +- tests/shell.c | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d84135a4..bc0144f8 100644 --- a/configure.ac +++ b/configure.ac @@ -134,11 +134,13 @@ AC_ARG_ENABLE(debug, [disable debug information [default=yes]])], [enable_debug=$enableval], [enable_debug=yes]) -if test "$enable_debug" = "yes"; then +if test "x$enable_debug" = "xyes"; then PACKAGE_CFLAGS="$PACKAGE_CFLAGS -g" AC_DEFINE([ENABLE_DEBUG],[1],[Whether debugging support is enabled]) fi +AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes") + AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) @@ -184,4 +186,5 @@ Configuration: Source code location: ${srcdir} Compiler: ${CC} Glade catalog: ${glade_catalog} + Debug enabled: ${enable_debug} " diff --git a/libgitg/Makefile.am b/libgitg/Makefile.am index a6f65725..baf1bfa3 100644 --- a/libgitg/Makefile.am +++ b/libgitg/Makefile.am @@ -51,7 +51,6 @@ C_FILES = \ gitg-commit.c \ gitg-config.c \ gitg-convert.c \ - gitg-debug.c \ gitg-hash.c \ gitg-i18n.c \ gitg-lane.c \ @@ -67,6 +66,10 @@ C_FILES = \ gitg-shell.c \ gitg-line-parser.c +if ENABLE_DEBUG + C_FILES += gitg-debug.c +endif + ENUM_H_FILES = \ gitg-changed-file.h diff --git a/libgitg/gitg-debug.h b/libgitg/gitg-debug.h index 55d4428b..81183b6a 100644 --- a/libgitg/gitg-debug.h +++ b/libgitg/gitg-debug.h @@ -49,7 +49,7 @@ void gitg_debug_message (guint level, #define gitg_debug(level,args...) gitg_debug_message (level, __FILE__, __LINE__, G_STRFUNC, args) #else -#define gitg_debug_init ; +#define gitg_debug_init(args...) ; #define gitg_debug_enabled(x) FALSE #define gitg_debug(level,args...) ; diff --git a/tests/shell.c b/tests/shell.c index 16d7e87c..b2c1ec20 100644 --- a/tests/shell.c +++ b/tests/shell.c @@ -1,5 +1,6 @@ #include #include +#include #define test_add_repo(name, callback) g_test_add (name, RepositoryInfo, NULL, repository_setup, callback, repository_cleanup)