summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2008-02-23 12:18:51 +0000
committerTim-Philipp Müller <tim@centricular.net>2008-02-23 12:18:51 +0000
commitce296a6e04ac824523dbf7bf836f91e14012ab9d (patch)
tree2b76abcf56256977da9fbad4132652edfb8ab1a2
parentbd6ec57040fe3fa93e21ca440dfe494e3ee18555 (diff)
m4/gst-error.m4: Reflow checks for additional warning flags so they're not nested, which fixes the result reporting i...
Original commit message from CVS: * m4/gst-error.m4: Reflow checks for additional warning flags so they're not nested, which fixes the result reporting in the configure output.
-rw-r--r--ChangeLog7
-rw-r--r--m4/gst-error.m451
2 files changed, 34 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 2966805..4812e10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-02-23 Tim-Philipp Müller <tim at centricular dot net>
+
+ * m4/gst-error.m4:
+ Reflow checks for additional warning flags so they're not
+ nested, which fixes the result reporting in the configure
+ output.
+
2008-02-22 Tim-Philipp Müller <tim at centricular dot net>
* m4/as-compiler-flag.m4:
diff --git a/m4/gst-error.m4 b/m4/gst-error.m4
index d9d9d82..24b931b 100644
--- a/m4/gst-error.m4
+++ b/m4/gst-error.m4
@@ -87,7 +87,9 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS],
dnl if asked for, add -Werror if supported
if test "x$1" != "xno"
then
- AS_CXX_COMPILER_FLAG([-Werror], [
+ AS_CXX_COMPILER_FLAG(-Werror, werror_supported=yes, werror_supported=no)
+
+ if test "x$werror_supported" = "xyes"; then
ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror"
dnl add exceptions
@@ -95,30 +97,31 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS],
do
AS_CXX_COMPILER_FLAG([$f], ERROR_CXXFLAGS="$ERROR_CXXFLAGS $f")
done
- ], [
+ else
dnl if -Werror isn't suported, try -errwarn=%all
- AS_CXX_COMPILER_FLAG([-errwarn=%all], [
- ERROR_CXXFLAGS="-errwarn=%all"
- dnl try -errwarn=%all,no%E_EMPTY_DECLARATION,
- dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH,
- dnl no%E_MACRO_REDEFINED (Sun Forte case)
- dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon
- dnl "statement not reached" disabled because there is g_assert_not_reached () in some places
- dnl "macro redefined" because of gst/gettext.h
- dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'?
- dnl FIXME: do any of these work with the c++ compiler? if not, why
- dnl do we check at all?
- for f in 'no%E_EMPTY_DECLARATION' \
- 'no%E_STATEMENT_NOT_REACHED' \
- 'no%E_ARGUEMENT_MISMATCH' \
- 'no%E_MACRO_REDEFINED'
- do
- AS_CXX_COMPILER_FLAG([-errwarn=%all,$f], [
- ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f"
- ])
- done
- ])
- ])
+ AS_CXX_COMPILER_FLAG([-errwarn=%all], errwarnall=yes, errwarnall=no)
+ if test "x$errwarnall" = "xyes"; then
+ ERROR_CXXFLAGS="-errwarn=%all"
+ dnl try -errwarn=%all,no%E_EMPTY_DECLARATION,
+ dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH,
+ dnl no%E_MACRO_REDEFINED (Sun Forte case)
+ dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon
+ dnl "statement not reached" disabled because there is g_assert_not_reached () in some places
+ dnl "macro redefined" because of gst/gettext.h
+ dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'?
+ dnl FIXME: do any of these work with the c++ compiler? if not, why
+ dnl do we check at all?
+ for f in 'no%E_EMPTY_DECLARATION' \
+ 'no%E_STATEMENT_NOT_REACHED' \
+ 'no%E_ARGUEMENT_MISMATCH' \
+ 'no%E_MACRO_REDEFINED'
+ do
+ AS_CXX_COMPILER_FLAG([-errwarn=%all,$f], [
+ ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f"
+ ])
+ done
+ fi
+ fi
fi
AC_SUBST(ERROR_CXXFLAGS)