[0.11] common: gst-args: add AG_GST_ARG_DISABLE_FATAL_WARNINGS to provide --disable-fatal-warnings configure option

Tim Müller tpm at kemper.freedesktop.org
Thu Jan 19 06:15:22 PST 2012


Module: common
Branch: 0.11
Commit: 17fa4abf49d31cf5dcc2994bdbaa86e45a3fb69f
URL:    http://cgit.freedesktop.org/gstreamer/common/commit/?id=17fa4abf49d31cf5dcc2994bdbaa86e45a3fb69f

Author: Colin Walters <walters at verbum.org>
Date:   Thu Jan 19 13:37:12 2012 +0000

gst-args: add AG_GST_ARG_DISABLE_FATAL_WARNINGS to provide --disable-fatal-warnings configure option

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.

---

 m4/gst-args.m4 |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/m4/gst-args.m4 b/m4/gst-args.m4
index 030e7ac..357379c 100644
--- a/m4/gst-args.m4
+++ b/m4/gst-args.m4
@@ -19,6 +19,7 @@ dnl AG_GST_ARG_ENABLE_EXTERNAL
 dnl AG_GST_ARG_ENABLE_EXPERIMENTAL
 dnl AG_GST_ARG_ENABLE_BROKEN
 
+dnl AG_GST_ARG_DISABLE_FATAL_WARNINGS
 AC_DEFUN([AG_GST_ARG_DEBUG],
 [
   dnl debugging stuff
@@ -325,3 +326,20 @@ AC_DEFUN([AG_GST_ARG_ENABLE_BROKEN],
       AC_MSG_NOTICE([not building broken plug-ins])
     ])
 ])
+
+dnl allow people (or build tools) to override default behaviour
+dnl for fatal compiler warnings
+AC_DEFUN([AG_GST_ARG_DISABLE_FATAL_WARNINGS],
+[
+  AC_ARG_ENABLE(fatal-warnings,
+    AC_HELP_STRING([--disable-fatal-warnings],
+                   [Don't turn compiler warnings into fatal errors]),
+    [
+      case "${enableval}" in
+        yes) FATAL_WARNINGS=yes ;;
+        no)  FATAL_WARNINGS=no ;;
+        *)   AC_MSG_ERROR(bad value ${enableval} for --disable-fatal-warnings) ;;
+      esac
+    ],
+    [FATAL_WARNINGS=$GST_GIT]) dnl Default value
+])



More information about the gstreamer-commits mailing list