diff --git a/acconfig.h b/acconfig.h index 2ada5ddbc7..9a8d21203c 100644 --- a/acconfig.h +++ b/acconfig.h @@ -17,3 +17,4 @@ #undef HAVE_ATOMIC_H #undef GST_DEBUG_ENABLED +#undef GST_INFO_ENABLED diff --git a/configure.in b/configure.in index ad68daf3d1..6c2e172889 100644 --- a/configure.in +++ b/configure.in @@ -318,7 +318,7 @@ esac], [PLUGINS_USE_SRCDIR=yes]) dnl Default value AC_ARG_ENABLE(debug, -[ --enable-debug spews lots of useless info at runtime], +[ --enable-debug compile with -g debugging info], [case "${enableval}" in yes) USE_DEBUG=yes ;; no) USE_DEBUG=no ;; @@ -326,6 +326,24 @@ AC_ARG_ENABLE(debug, esac], [USE_DEBUG=no]) dnl Default value +AC_ARG_ENABLE(debug-verbose, +[ --enable-debug-verbose spews lots of useless debugging info at runtime], +[case "${enableval}" in + yes) USE_DEBUG_VERBOSE=yes ;; + no) USE_DEBUG_VERBOSE=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-verbose) ;; +esac], +[USE_DEBUG_VERBOSE=no]) dnl Default value + +AC_ARG_ENABLE(debug-info, +[ --enable-debug-info spews lots of info at runtime for plugin writers], +[case "${enableval}" in + yes) USE_DEBUG_INFO=yes ;; + no) USE_DEBUG_INFO=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug-info) ;; +esac], +[USE_DEBUG_INFO=no]) dnl Default value + AC_ARG_ENABLE(profiling, [ --enable-profiling adds -pg to compiler commandline, for profiling], [case "${enableval}" in @@ -364,9 +382,16 @@ fi if test "x$USE_DEBUG" = xyes; then CFLAGS="$CFLAGS -g" +fi + +if test "x$USE_DEBUG_VERBOSE" = xyes; then AC_DEFINE(GST_DEBUG_ENABLED) fi +if test "x$USE_DEBUG_INFO" = xyes; then + AC_DEFINE(GST_INFO_ENABLED) +fi + if test "x$USE_PROFILING" = xyes; then CFLAGS="$CFLAGS -pg" fi @@ -425,7 +450,6 @@ gst/Makefile gst/types/Makefile gst/meta/Makefile gst/elements/Makefile -gst/xml/Makefile libs/Makefile libs/riff/Makefile libs/colorspace/Makefile diff --git a/gst/gstinfo.h b/gst/gstinfo.h index e672cfb7d1..f1ffaf0910 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -179,7 +179,16 @@ void gst_default_info_handler (gint category,gchar *file,gchar *function, extern GstInfoHandler _gst_info_handler; extern guint32 _gst_info_categories; +/* for include files that make too much noise normally */ +#ifdef GST_INFO_FORCE_DISABLE +#undef GST_INFO_ENABLED +#endif +/* for applications that really really want all the noise */ +#ifdef GST_INFO_FORCE_ENABLE +#define GST_INFO_ENABLED +#endif +#ifdef GST_INFO_ENABLED #define INFO(cat,format,args...) G_STMT_START{ \ if ((1<