Commit ce296a6e authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

m4/gst-error.m4: Reflow checks for additional warning flags so they're not...

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.
parent bd6ec570
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> 2008-02-22 Tim-Philipp Müller <tim at centricular dot net>
* m4/as-compiler-flag.m4: * m4/as-compiler-flag.m4:
......
...@@ -87,7 +87,9 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS], ...@@ -87,7 +87,9 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS],
dnl if asked for, add -Werror if supported dnl if asked for, add -Werror if supported
if test "x$1" != "xno" if test "x$1" != "xno"
then 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" ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Werror"
dnl add exceptions dnl add exceptions
...@@ -95,30 +97,31 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS], ...@@ -95,30 +97,31 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS],
do do
AS_CXX_COMPILER_FLAG([$f], ERROR_CXXFLAGS="$ERROR_CXXFLAGS $f") AS_CXX_COMPILER_FLAG([$f], ERROR_CXXFLAGS="$ERROR_CXXFLAGS $f")
done done
], [ else
dnl if -Werror isn't suported, try -errwarn=%all dnl if -Werror isn't suported, try -errwarn=%all
AS_CXX_COMPILER_FLAG([-errwarn=%all], [ AS_CXX_COMPILER_FLAG([-errwarn=%all], errwarnall=yes, errwarnall=no)
ERROR_CXXFLAGS="-errwarn=%all" if test "x$errwarnall" = "xyes"; then
dnl try -errwarn=%all,no%E_EMPTY_DECLARATION, ERROR_CXXFLAGS="-errwarn=%all"
dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH, dnl try -errwarn=%all,no%E_EMPTY_DECLARATION,
dnl no%E_MACRO_REDEFINED (Sun Forte case) dnl no%E_STATEMENT_NOT_REACHED,no%E_ARGUEMENT_MISMATCH,
dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon dnl no%E_MACRO_REDEFINED (Sun Forte case)
dnl "statement not reached" disabled because there is g_assert_not_reached () in some places dnl For Forte we need disable "empty declaration" warning produced by un-needed semicolon
dnl "macro redefined" because of gst/gettext.h dnl "statement not reached" disabled because there is g_assert_not_reached () in some places
dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'? dnl "macro redefined" because of gst/gettext.h
dnl FIXME: do any of these work with the c++ compiler? if not, why dnl FIXME: is it really supposed to be 'ARGUEMENT' and not 'ARGUMENT'?
dnl do we check at all? dnl FIXME: do any of these work with the c++ compiler? if not, why
for f in 'no%E_EMPTY_DECLARATION' \ dnl do we check at all?
'no%E_STATEMENT_NOT_REACHED' \ for f in 'no%E_EMPTY_DECLARATION' \
'no%E_ARGUEMENT_MISMATCH' \ 'no%E_STATEMENT_NOT_REACHED' \
'no%E_MACRO_REDEFINED' 'no%E_ARGUEMENT_MISMATCH' \
do 'no%E_MACRO_REDEFINED'
AS_CXX_COMPILER_FLAG([-errwarn=%all,$f], [ do
ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f" AS_CXX_COMPILER_FLAG([-errwarn=%all,$f], [
]) ERROR_CXXFLAGS="$ERROR_CXXFLAGS,$f"
done ])
]) done
]) fi
fi
fi fi
AC_SUBST(ERROR_CXXFLAGS) AC_SUBST(ERROR_CXXFLAGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment