From e9212c6cb3e7efd5165ce10264f25a61ca371b0e Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 18 Jan 2012 16:18:41 -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 | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 681bc37..6b0a677 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/law/alaw.c]) @@ -298,7 +302,7 @@ AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO], dnl define an ERROR_CFLAGS Makefile variable dnl -Wundef: too many broken headers if test "x$HAVE_OSX_VIDEO" != "xyes"; then - AG_GST_SET_ERROR_CFLAGS($GST_GIT, [ + AG_GST_SET_ERROR_CFLAGS($GST_FATAL_WARNINGS, [ -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wwrite-strings -Wold-style-definition -Waggregate-return -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar @@ -307,7 +311,7 @@ else dnl work-around for us passing GST_CFLAGS to the ObjC-compiler, which dnl doesn't understand all warning flags that the C compiler knows about dnl (e.g. -Waddress) or causes problems with some flags (-Waggregate-return) - AG_GST_SET_ERROR_CFLAGS($GST_GIT, [ + AG_GST_SET_ERROR_CFLAGS($GST_FATAL_WARNINGS, [ -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wwrite-strings -Wold-style-definition -Winit-self -Wmissing-include-dirs -Wno-multichar @@ -315,13 +319,13 @@ else fi 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 -Wwrite-strings -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar ]) 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