configure: suppress unused variable warnings if gst debugging is disabled

https://bugzilla.gnome.org/show_bug.cgi?id=662952
This commit is contained in:
Tim-Philipp Müller 2011-11-04 00:03:05 +00:00
parent 1fa23148fa
commit 84e10969f4

View file

@ -637,8 +637,14 @@ dnl FIXME: add LIBXML_PKG here if we use it
GST_PKG_DEPS="glib-2.0, gobject-2.0, gmodule-no-export-2.0, gthread-2.0"
AC_SUBST(GST_PKG_DEPS)
dnl make sure it doesn't complain about unused variables if debugging is disabled
NO_WARNINGS=""
if test "x${GST_DISABLE_GST_DEBUG}" = "xyes"; then
NO_WARNINGS="-Wno-unused"
fi
dnl define an ERROR_CFLAGS Makefile variable
AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar -Wnested-externs])
AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar -Wnested-externs $NO_WARNINGS])
dnl define correct level for debugging messages
AG_GST_SET_LEVEL_DEFAULT($GST_GIT)