[gnome-games] aisleriot: Add configure switch to enable debugging UI



commit b937cc7f97cdc300b71fd005620eecfc85f4b883
Author: Christian Persch <chpe gnome org>
Date:   Thu Jan 21 14:18:29 2010 +0100

    aisleriot: Add configure switch to enable debugging UI

 aisleriot/Makefile.am |   20 +++++++++++++++-----
 aisleriot/window.c    |   11 ++++-------
 configure.in          |   18 ++++++++++++++++++
 3 files changed, 37 insertions(+), 12 deletions(-)
---
diff --git a/aisleriot/Makefile.am b/aisleriot/Makefile.am
index e673758..99c786a 100644
--- a/aisleriot/Makefile.am
+++ b/aisleriot/Makefile.am
@@ -42,8 +42,6 @@ sol_SOURCES = \
 	util.h		\
 	window.c	\
 	window.h	\
-	prop-editor.c	\
-	prop-editor.h	\
 	$(NULL)
 
 if HAVE_MAEMO_5
@@ -56,7 +54,14 @@ endif
 if !HAVE_GUILE_1_8
 sol_SOURCES += guile16-compat.h
 endif
-		
+
+if ENABLE_DEBUG_UI
+sol_SOURCES += \
+	prop-editor.c	\
+	prop-editor.h	\
+	$(NULL)
+endif
+
 # FIXMEchpe: fix localedir for maemo? $PKG_CONFIG osso-af-settings --variable=localedir
 
 sol_CPPFLAGS = \
@@ -138,8 +143,6 @@ sol_clutter_SOURCES = \
 	util.h		\
 	window.c	\
 	window.h	\
-	prop-editor.c	\
-	prop-editor.h	\
 	$(NULL)
 
 if HAVE_MAEMO_5
@@ -153,6 +156,13 @@ if !HAVE_GUILE_1_8
 sol_clutter_SOURCES += guile16-compat.h
 endif
 		
+if ENABLE_DEBUG_UI
+sol_clutter_SOURCES += \
+	prop-editor.c	\
+	prop-editor.h	\
+	$(NULL)
+endif
+
 sol_clutter_CPPFLAGS = $(sol_CPPFLAGS) -DHAVE_CLUTTER
 sol_clutter_CFLAGS = $(sol_CFLAGS) $(CLUTTER_CFLAGS) $(CLUTTER_GTK_CFLAGS)
 sol_clutter_LDFLAGS = $(sol_LDFLAGS)
diff --git a/aisleriot/window.c b/aisleriot/window.c
index 1f49c0f..8aed457 100644
--- a/aisleriot/window.c
+++ b/aisleriot/window.c
@@ -69,6 +69,10 @@
 
 #include "window.h"
 
+#ifdef ENABLE_DEBUG_UI
+#include "prop-editor.h"
+#endif
+
 #define AISLERIOT_WINDOW_GET_PRIVATE(window)(G_TYPE_INSTANCE_GET_PRIVATE ((window), AISLERIOT_TYPE_WINDOW, AisleriotWindowPrivate))
 
 #define MIN_WIDTH 600
@@ -105,13 +109,6 @@
 #define LEAVE_FULLSCREEN_BUTTON
 #endif
 
-/* define this to enable a debug menu */
-/* #undef ENABLE_DEBUG_UI */
-
-#ifdef ENABLE_DEBUG_UI
-#include "prop-editor.h"
-#endif
-
 enum
 {
   ACTION_UNDO_MOVE,
diff --git a/configure.in b/configure.in
index bf06f5c..43d267d 100644
--- a/configure.in
+++ b/configure.in
@@ -366,7 +366,9 @@ else
   enable_sound=no
 fi
 
+# *******
 # Clutter
+# *******
 
 # We're using need_guile as a quick way to check whether building aisleriot
 if test "$need_guile" = "yes"; then
@@ -507,6 +509,22 @@ fi
 
 AM_CONDITIONAL([ENABLE_CARD_THEMES_INSTALLER],[test "$enable_card_themes_installer" = "yes"])
 
+# ******************
+# Extra Debugging UI
+# ******************
+
+AC_MSG_CHECKING([whether extra debugging UI in Aisleriot is requested])
+AC_ARG_ENABLE([debug-ui],
+  [AS_HELP_STRING([--debug-ui],[Enable extra debugging UI in Aisleriot (default: disabled)])],
+  [],[enable_debug_ui=no])
+AC_MSG_RESULT([$enable_debug_ui])
+
+if test "$enable_debug_ui" = "yes"; then
+  AC_DEFINE([ENABLE_DEBUG_UI],[1],[Define extra debugging UI in Aisleriot is enabled])
+fi
+
+AM_CONDITIONAL([ENABLE_DEBUG_UI],[test "$enable_debug_ui" = "yes"])
+
 # ********************
 # Checks for libraries
 # ********************



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