[krb5-auth-dialog] Use g_debug instead of a custom debug macro



commit ff01590b7ec884afef7996d2f416564bf0857f89
Author: Guido Günther <agx sigxcpu org>
Date:   Sun Oct 12 10:27:37 2014 +0200

    Use g_debug instead of a custom debug macro
    
    set a log domain accordingly. This make rebuilding for debugging
    superfluous.

 plugins/Makefile.am  |   16 +++++++++++-----
 src/Makefile.am      |    1 +
 src/ka-applet-priv.h |    9 +++------
 3 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 36e1ca3..7a8d281 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -8,6 +8,12 @@ else
   PAM_PLUGIN =
 endif
 
+AM_CPPFLAGS = \
+       -I$(top_srcdir)/src \
+       $(DISABLE_DEPRECATED) \
+       -DG_LOG_DOMAIN="\"KrbAuthDialog\"" \
+       $(NULL)
+
 pkglib_LTLIBRARIES = \
        libka-plugin-dummy.la \
        $(PAM_PLUGIN) \
@@ -22,8 +28,8 @@ libka_plugin_dummy_la_SOURCES = \
        $(NULL)
 
 libka_plugin_dummy_la_CPPFLAGS = \
-       $(GTK_CFLAGS)       \
-       -I$(top_srcdir)/src \
+       $(AM_CPPFLAGS) \
+       $(GTK_CFLAGS)  \
        $(NULL)
 
 libka_plugin_dummy_la_LDFLAGS = \
@@ -39,8 +45,8 @@ libka_plugin_pam_la_SOURCES = \
        $(NULL)
 
 libka_plugin_pam_la_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
        $(GTK_CFLAGS)       \
-       -I$(top_srcdir)/src \
        $(NULL)
 
 libka_plugin_pam_la_LDFLAGS = \
@@ -57,8 +63,8 @@ libka_plugin_afs_la_SOURCES = \
        $(NULL)
 
 libka_plugin_afs_la_CPPFLAGS = \
-       $(GTK_CFLAGS)       \
        -I$(top_srcdir)/src \
+       $(GTK_CFLAGS)       \
        $(NULL)
 
 libka_plugin_afs_la_LDFLAGS = \
@@ -73,8 +79,8 @@ libka_plugin_gnomelock_la_SOURCES = \
        $(NULL)
 
 libka_plugin_gnomelock_la_CPPFLAGS = \
-       $(GIO_CFLAGS)       \
        -I$(top_srcdir)/src \
+       $(GIO_CFLAGS)       \
        $(NULL)
 
 libka_plugin_gnomelock_la_LDFLAGS = \
diff --git a/src/Makefile.am b/src/Makefile.am
index fd055cb..78aa1d9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -93,6 +93,7 @@ krb5_auth_dialog_LDADD = \
 AM_CPPFLAGS = \
        -I $(top_srcdir)/secmem/ \
        $(DISABLE_DEPRECATED) \
+       -DG_LOG_DOMAIN="\"KrbAuthDialog\"" \
        $(NULL)
 
 pkgdatadir = $(datadir)/krb5-auth-dialog
diff --git a/src/ka-applet-priv.h b/src/ka-applet-priv.h
index eaf5b48..d9c0bd4 100644
--- a/src/ka-applet-priv.h
+++ b/src/ka-applet-priv.h
@@ -75,11 +75,8 @@ void ka_applet_destroy (KaApplet *self);
 int ka_applet_update_status (KaApplet *self, krb5_timestamp expiry);
 
 G_END_DECLS
-#ifdef ENABLE_DEBUG
-#define KA_DEBUG(fmt,...) \
-    g_printf ("DEBUG: %s: " fmt "\n", __func__, ##__VA_ARGS__)
-#else
+
 #define KA_DEBUG(fmt,...) \
-    do { } while (0)
-#endif /* !ENABLE_DEBUG */
+    g_debug ("%s: " fmt, __func__, ##__VA_ARGS__)
+
 #endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]