summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2005-07-08 14:33:28 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2005-07-08 14:33:28 +0000
commitac7272b7af934c2294a44ac1c0f3fac3f8d17ec6 (patch)
treec690f5815afca8282a07f486f5f39c643feac635
parent221ac8abacb46858382a9f8c924152ae588f4a2e (diff)
downloadgstreamer-common-RELEASE-0_8_6.tar.gz
Original commit message from CVS: add macro to set ERROR_CFLAGS
-rw-r--r--ChangeLog5
-rw-r--r--m4/gst-error.m434
2 files changed, 39 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 0e082b7..22de3f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-08 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * m4/gst-error.m4:
+ add macro to set ERROR_CFLAGS
+
2005-06-30 Jan Schmidt <thaytan@mad.scientist.com>
* gst-autogen.sh:
diff --git a/m4/gst-error.m4 b/m4/gst-error.m4
new file mode 100644
index 0000000..509202e
--- /dev/null
+++ b/m4/gst-error.m4
@@ -0,0 +1,34 @@
+dnl Decide on error flags
+
+dnl Thomas Vander Stichele <thomas@apestaart.org>
+
+dnl Last modification: 08/07/2005
+
+dnl GST_SET_ERROR_CFLAGS([ADD-WERROR])
+
+dnl Sets ERROR_CFLAGS to something the compiler will accept.
+dnl AC_SUBST them so they are available in Makefile
+
+dnl -Wall is added if it is supported
+dnl -Werror is added if ADD-WERROR is not "no"
+
+dnl These flags can be overridden at make time:
+dnl make ERROR_CFLAGS=
+
+AC_DEFUN([GST_SET_ERROR_CFLAGS],
+[AC_REQUIRE([AS_COMPILER_FLAG])dnl
+
+dnl if we support -Wall, set it unconditionally
+AS_COMPILER_FLAG(-Wall,
+ ERROR_CFLAGS="-Wall",
+ ERROR_CFLAGS="")
+
+dnl if we're in nano >= 1, add -Werror if supported
+if test "x$1" != "xno"
+then
+ AS_COMPILER_FLAG(-Werror, ERROR_CFLAGS="$ERROR_CFLAGS -Werror")
+fi
+
+AC_SUBST(ERROR_CFLAGS)
+AC_MSG_NOTICE([set ERROR_CFLAGS to $ERROR_CFLAGS])
+])