[vino] Use debug autoconf checks provided by gnome-common



commit 06dcb0d5fc38f74824492a63b45421daa5c9f1fd
Author: Jonh Wendell <jwendell gnome org>
Date:   Tue Jun 29 15:27:19 2010 -0300

    Use debug autoconf checks provided by gnome-common

 configure.in       |   14 +-------------
 server/Makefile.am |    1 -
 server/vino-fb.c   |    6 +++---
 server/vino-main.c |    4 ++--
 server/vino-util.c |    4 ++--
 server/vino-util.h |    6 +++---
 6 files changed, 11 insertions(+), 24 deletions(-)
---
diff --git a/configure.in b/configure.in
index 6c0ced0..d928e29 100644
--- a/configure.in
+++ b/configure.in
@@ -13,6 +13,7 @@ dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
 AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
 
 GNOME_COMPILE_WARNINGS([maximum])
+GNOME_DEBUG_CHECK
 GNOME_MAINTAINER_MODE_DEFINES
 
 LT_PREREQ([2.2.6])
@@ -389,19 +390,6 @@ if test "x$have_libunique" = "xyes" ; then
   AC_DEFINE(VINO_ENABLE_LIBUNIQUE, [], [Set if we should use libunique])
 fi
 
-dnl --enable-debug=(yes|minimum|no)
-AC_ARG_ENABLE(debug, [  --enable-debug=[no/yes] turn on debugging [default=no]],,enable_debug=minimum)
-if test "$enable_debug" = "yes"; then
-  VINO_DEBUG_CFLAGS="-DG_ENABLE_DEBUG"
-else
-  if test "x$enable_debug" = "xno"; then
-    VINO_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
-  else
-    VINO_DEBUG_CFLAGS=""
-  fi
-fi
-AC_SUBST(VINO_DEBUG_CFLAGS)
-
 AM_GCONF_SOURCE_2
 
 dnl define a MAINT-like variable REBUILD which is set
diff --git a/server/Makefile.am b/server/Makefile.am
index b215a79..1342487 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -7,7 +7,6 @@ INCLUDES = \
 	-I$(top_srcdir)/server/miniupnp \
 	-I$(top_srcdir)/server/smclient \
 	$(VINO_SERVER_CFLAGS) \
-	$(VINO_DEBUG_CFLAGS) \
 	$(VINO_LIBNOTIFY_CFLAGS) \
 	$(VINO_KEYRING_CFLAGS) \
 	$(VINO_HTTP_CFLAGS) \
diff --git a/server/vino-fb.c b/server/vino-fb.c
index b8306c1..8d3bf64 100644
--- a/server/vino-fb.c
+++ b/server/vino-fb.c
@@ -181,7 +181,7 @@ vino_fb_get_image (VinoFB          *vfb,
 
   if ((error = gdk_error_trap_pop ()))
     {
-#ifdef G_ENABLE_DEBUG
+#ifdef GNOME_ENABLE_DEBUG
       char error_text [64];
 
       XGetErrorText (vfb->priv->xdisplay, error, error_text, 63);
@@ -612,7 +612,7 @@ vino_fb_xdamage_idle_handler (VinoFB *vfb)
 
   if ((error = gdk_error_trap_pop ()))
     {
-#ifdef G_ENABLE_DEBUG
+#ifdef GNOME_ENABLE_DEBUG
       char error_text [64];
 
       XGetErrorText (vfb->priv->xdisplay, error, error_text, 63);
@@ -1180,7 +1180,7 @@ vino_fb_debug_dump_damage (VinoFB       *vfb,
 			   GdkRectangle *rects,
 			   int           n_rects)
 {
-#ifdef G_ENABLE_DEBUG
+#ifdef GNOME_ENABLE_DEBUG
   if (_vino_debug_flags & VINO_DEBUG_POLLING)
     {
       GdkRectangle clipbox;
diff --git a/server/vino-main.c b/server/vino-main.c
index ac75829..54d119e 100644
--- a/server/vino-main.c
+++ b/server/vino-main.c
@@ -39,7 +39,7 @@
 #ifdef HAVE_GNUTLS
 #include <gnutls/gnutls.h>
 
-#ifdef G_ENABLE_DEBUG
+#ifdef GNOME_ENABLE_DEBUG
 static void
 vino_debug_gnutls (int         level,
 		   const char *str)
@@ -85,7 +85,7 @@ main (int argc, char **argv)
   vino_setup_debug_flags ();
 
 #ifdef HAVE_GNUTLS
-#ifdef G_ENABLE_DEBUG
+#ifdef GNOME_ENABLE_DEBUG
   if (_vino_debug_flags & VINO_DEBUG_TLS)
     {
       gnutls_global_set_log_level (10);
diff --git a/server/vino-util.c b/server/vino-util.c
index e9c4a38..d7e39d8 100644
--- a/server/vino-util.c
+++ b/server/vino-util.c
@@ -25,7 +25,7 @@
 #include "vino-util.h"
 #include <gtk/gtk.h>
 
-#ifdef G_ENABLE_DEBUG
+#ifdef GNOME_ENABLE_DEBUG
 VinoDebugFlags _vino_debug_flags = VINO_DEBUG_NONE;
 
 void
@@ -54,7 +54,7 @@ vino_setup_debug_flags (void)
 					       debug_keys,
 					       G_N_ELEMENTS (debug_keys));
 }
-#endif /* G_ENABLE_DEBUG */
+#endif /* GNOME_ENABLE_DEBUG */
 
 static struct VinoStockItem
 {
diff --git a/server/vino-util.h b/server/vino-util.h
index fed3022..97b0ae3 100644
--- a/server/vino-util.h
+++ b/server/vino-util.h
@@ -50,7 +50,7 @@ typedef enum
   VINO_DEBUG_TUBE    = 1 << 10
 } VinoDebugFlags;
 
-#ifdef G_ENABLE_DEBUG
+#ifdef GNOME_ENABLE_DEBUG
 
 #include <stdio.h>
 
@@ -70,7 +70,7 @@ extern VinoDebugFlags _vino_debug_flags;
 
 void vino_setup_debug_flags (void);
 
-#else /* if !defined (G_ENABLE_DEBUG) */
+#else /* if !defined (GNOME_ENABLE_DEBUG) */
 
 #ifdef G_HAVE_ISO_VARARGS
 #  define dprintf(...)
@@ -80,7 +80,7 @@ void vino_setup_debug_flags (void);
 
 #define vino_setup_debug_flags()
 
-#endif /* G_ENABLE_DEBUG */
+#endif /* GNOME_ENABLE_DEBUG */
 
 void  vino_init_stock_items	(void);
 



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