Subject: aclocal -W error does not treat warnings as errors

From: Křištof Želechovski <[email-masked]>
Date: Sun, 9 Oct 2011 17:27:32 +0200

I would expect aclocal to fail and terminate the build script if warnings appear [1]; however, it does not happen:

== Steps to reproduce ==
{ cat >configure.ac <<'#>configure.ac' && aclocal -W error && echo $?; }
AC_INIT([name],[0.0.1])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AC_COMPILE_IFELSE()
AC_USE_SYSTEM_EXTENSIONS
#>configure.ac

== Actual results ==
configure.ac:26: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
0

== Expected results ==
configure.ac:26: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS

== Workaround ==
{ WARNINGS=error aclocal; }
aclocal: autom4te failed with exit status: 1

== Remarks ==
It seems that aclocal fails to pass -Werror to autom4te.

___
[1] <URL: http://sources.redhat.com/automake/automake.html#aclocal-Options >