Fix --disable-debug

This commit is contained in:
Jesse van den Kieboom 2011-03-28 10:33:13 +02:00
parent f5da48b42c
commit c6176c0e80
4 changed files with 10 additions and 3 deletions

View file

@ -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}
"

View file

@ -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

View file

@ -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...) ;

View file

@ -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)