[gitg/gtk3] Fix --disable-debug
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/gtk3] Fix --disable-debug
- Date: Mon, 28 Mar 2011 12:23:19 +0000 (UTC)
commit f5358d7c3d99dde56c0cf3eff7fe3a67173f85cb
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Mon Mar 28 10:33:13 2011 +0200
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 510005f..cedb81c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -106,11 +106,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)
@@ -156,4 +158,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 a6f6572..baf1bfa 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 55d4428..81183b6 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 16d7e87..b2c1ec2 100644
--- a/tests/shell.c
+++ b/tests/shell.c
@@ -1,5 +1,6 @@
#include <libgitg/gitg-shell.h>
#include <string.h>
+#include <libgitg/gitg-debug.h>
#define test_add_repo(name, callback) g_test_add (name, RepositoryInfo, NULL, repository_setup, callback, repository_cleanup)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]