# HG changeset patch # User Matti Hamalainen # Date 1352285566 -7200 # Node ID 0c2f8ee6be42552a9a84cb25ee5e0131e3f6b381 # Parent 8f155eca3612a429cbf6a6f2d3165f6358d46a7e Make debug output compile-time configurable via --enable-debug. Disabled by default. diff -r 8f155eca3612 -r 0c2f8ee6be42 configure.ac --- a/configure.ac Wed Nov 07 12:46:16 2012 +0200 +++ b/configure.ac Wed Nov 07 12:52:46 2012 +0200 @@ -19,10 +19,11 @@ dnl *** Define some templates dnl *** AH_TEMPLATE([HAVE_SONG_POSITION], [Define if you have XMMS patched with the songpos patch.]) -AH_TEMPLATE([HAVE_SIDPLAY1], [Define if you have and want to use libSIDPlay 1]) -AH_TEMPLATE([HAVE_SIDPLAY2], [Define if you have and want to use libSIDPlay 2]) +AH_TEMPLATE([HAVE_SIDPLAY1], [Define if you have and want to use libSIDPlay 1.]) +AH_TEMPLATE([HAVE_SIDPLAY2], [Define if you have and want to use libSIDPlay 2.]) AH_TEMPLATE([HAVE_SIDPLAY2_FP], [Define if you have and want to use libSIDPlay 2-FP http://sourceforge.net/projects/sidplay-residfp/]) AH_TEMPLATE([HAVE_THEMETUNE], [Define if you want to build code to play XMMS-SID theme SID-tune. The tune needs to be installed too, though.]) +AH_TEMPLATE([DEBUG], [Define if you wish to enable debug output to terminal.]) dnl *** @@ -66,6 +67,23 @@ dnl *** +dnl *** Enable debugging +dnl *** +AC_ARG_ENABLE([debug], +[AS_HELP_STRING([--enable-debug], [Enable debug output to terminal/console.])], +[ +if test "x$enableval" = "xyes"; then + xs_enable_debug=yes +else + xs_enable_debug=no +fi +], [xs_enable_debug=no]) +if test "x$xs_enable_debug" = "xyes"; then + AC_DEFINE([DEBUG]) +fi + + +dnl *** dnl *** Enable or disable themetune support/installation dnl *** AC_ARG_ENABLE([themetune], @@ -192,4 +210,5 @@ Included builders : $xs_builders XMMS-SID theme SID-tune : $xs_have_themetune Translations (i18n/nls) : $USE_NLS + Debugging enabled : $xs_enable_debug ]) diff -r 8f155eca3612 -r 0c2f8ee6be42 src/config.h.in --- a/src/config.h.in Wed Nov 07 12:46:16 2012 +0200 +++ b/src/config.h.in Wed Nov 07 12:52:46 2012 +0200 @@ -1,5 +1,8 @@ /* src/config.h.in. Generated from configure.ac by autoheader. */ +/* Define if you wish to enable debug output to terminal. */ +#undef DEBUG + /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS diff -r 8f155eca3612 -r 0c2f8ee6be42 src/xmms-sid.h --- a/src/xmms-sid.h Wed Nov 07 12:46:16 2012 +0200 +++ b/src/xmms-sid.h Wed Nov 07 12:52:46 2012 +0200 @@ -29,14 +29,6 @@ extern "C" { #endif -/* - * Some constants and defines - */ -/* #define to enable spurious debugging messages for development - * purposes. Output goes to stderr. See also DEBUG_NP below. - */ -#define DEBUG - /* Define to ISO C99 macro for debugging instead of varargs function. * This provides more useful information, but is incompatible with * older standards. If #undef'd, a varargs function is used instead.