I'm checking this in.
This patch changes the build so that if we're using gcc on Linux, then
we enable -Werror by default. You can still disable it with the
appropriate configure option if that is what you want. The rationale
for this change is that many of the folks working on the native code
are on Linux, and this will help prevent minor build breakages due to
warnings.
Tom
2006-07-28 Tom Tromey <[EMAIL PROTECTED]>
* configure.ac: Enable -Werror by default on Linux-with-gcc.
Index: configure.ac
===================================================================
RCS file: /cvsroot/classpath/classpath/configure.ac,v
retrieving revision 1.173
diff -u -r1.173 configure.ac
--- configure.ac 28 Jul 2006 20:41:25 -0000 1.173
+++ configure.ac 28 Jul 2006 21:37:49 -0000
@@ -120,9 +120,9 @@
[case "${enableval}" in
yes) ENABLE_WERROR=yes ;;
no) ENABLE_WERROR=no ;;
- *) ENABLE_WERROR=no ;;
+ *) ENABLE_WERROR=default ;;
esac],
- [ENABLE_WERROR=no])
+ [ENABLE_WERROR=default])
dnl -----------------------------------------------------------
dnl Default AWT toolkit
@@ -305,6 +305,17 @@
AC_PROG_CC
AC_PROG_CPP
+# Handle -Werror default case.
+if test "$ENABLE_WERROR" = default; then
+ case "$host_os" in
+ *linux*)
+ if test "$GCC" = yes; then
+ ENABLE_WERROR=yes
+ fi
+ ;;
+ esac
+fi
+
if test "x${COMPILE_COLLECTIONS}" = xyes; then
AC_PATH_PROG(PERL, [perl])
AC_SUBST(PERL)