From f2849da4e3f832d6f5a99bc0f1c0952af3fd2f53 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 17 Jan 2012 16:50:46 -0500 Subject: [PATCH] build: Add --disable-fatal-warnings It's reasonable to build from git, but not want to turn all compiler warnings into fatal errors. For example, GNOME's jhbuild helps people get newer versions of software than came from their distribution, but they may not necessarily want to hack on it. --- configure.ac | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 13647a4..0e3b20e 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,10 @@ AS_VERSION dnl check if this is a release version AS_NANO(GST_GIT="no", GST_GIT="yes") +AC_ARG_ENABLE(fatal-warnings, + AS_HELP_STRING([--enable-fatal-warnings], + [Turn compiler warnings into fatal errors]), + [GST_FATAL_WARNINGS=$enableval], [GST_FATAL_WARNINGS=$GST_GIT]) dnl can autoconf find the source ? AC_CONFIG_SRCDIR([gst/audiotestsrc/gstaudiotestsrc.c]) @@ -367,21 +371,21 @@ AG_GST_CHECK_GST_DEBUG_DISABLED([NO_WARNINGS="-Wno-unused"], [NO_WARNINGS=""]) dnl define an ERROR_CFLAGS Makefile variable dnl -Wformat-nonliteral - see ext/pango/gstclockoverlay.c and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39438 -AG_GST_SET_ERROR_CFLAGS($GST_GIT, [ +AG_GST_SET_ERROR_CFLAGS($GST_FATAL_WARNINGS, [ -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wformat-nonliteral -Wformat-security -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar -Wnested-externs $NO_WARNINGS]) dnl define an ERROR_CXXFLAGS Makefile variable -AG_GST_SET_ERROR_CXXFLAGS($GST_GIT, [ +AG_GST_SET_ERROR_CXXFLAGS($GST_FATAL_WARNINGS, [ -Wmissing-declarations -Wredundant-decls -Wundef -Wwrite-strings -Wformat-nonliteral -Wformat-security -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return -Wno-multichar $NO_WARNINGS]) dnl define correct level for debugging messages -AG_GST_SET_LEVEL_DEFAULT($GST_GIT) +AG_GST_SET_LEVEL_DEFAULT($GST_FATAL_WARNINGS) dnl used in examples AG_GST_DEFAULT_ELEMENTS -- 1.7.6.5