This fixes the GCJ version warning so it only applies
to versions prior to 4.3 that used their own compiler
rather than ecj.
ChangeLog:
2008-06-29 Andrew John Hughes <[EMAIL PROTECTED]>
* m4/ac_prog_javac.m4:
Only display GCJ warning on versions prior to 4.3.
--
Andrew :)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Index: m4/ac_prog_javac.m4
===================================================================
RCS file: /sources/classpath/cp-tools/m4/ac_prog_javac.m4,v
retrieving revision 1.2
diff -u -u -r1.2 ac_prog_javac.m4
--- m4/ac_prog_javac.m4 29 Jun 2008 17:09:09 -0000 1.2
+++ m4/ac_prog_javac.m4 29 Jun 2008 17:21:06 -0000
@@ -12,18 +12,24 @@
fi
test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in
\$PATH])
AC_PROG_JAVAC_WORKS
-(echo "$JAVAC" | grep -e " -C$" >/dev/null 2>/dev/null) && AC_MSG_WARN([
-The build seems to be using gcj for bytecode generation. Some
-versions of gcj are known to produce bad bytecode. See here for a
-list of bugs that may be relevant:
+if (echo "$JAVAC" | grep -e "gcj" >/dev/null 2>/dev/null); then
+ case $(gcj -dumpversion) in
+ 4.3*)
+ ;;
+ *)
+ AC_MSG_WARN([ The build seems to be using a version of gcj prior
+to 4.3 for bytecode generation. Some versions of gcj are known to
+produce bad bytecode. See here for a list of bugs that may be
+relevant:
http://gcc.gnu.org/bugzilla/buglist.cgi?component=java&keywords=wrong-code&order=default
-At least bug 19921 is known to affect gjdoc (in Feb 2005).
-
You may want to set the environment variable JAVAC to an alternate
compiler, such as jikes, to make sure that you end up with valid
bytecode.
]);
+ ;;
+ esac
+fi
AC_PROVIDE([$0])dnl
])