[cp-patches] FYI: Cleanup and modernise AC_PROG_JAVA and AC_PROG_JAVAC

Andrew John Hughes gnu_andrew at member.fsf.org
Sat Jun 21 19:51:00 UTC 2008


This patch adds cacao and jamvm to the list of detected
virtual machines by AC_PROG_JAVA.  It also stores the warning
options for AC_PROG_JAVAC in a common variable.

ChangeLog:

2008-06-21  Andrew John Hughes  <gnu_andrew at member.fsf.org>

	* m4/ac_prog_java.m4:
	Add CACAO and JamVM.
	* m4/ac_prog_javac.m4:
	Use variables to store warning options.

-- 
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
-------------- next part --------------
Index: m4/ac_prog_java.m4
===================================================================
RCS file: /sources/classpath/classpath/m4/ac_prog_java.m4,v
retrieving revision 1.1
diff -u -u -r1.1 ac_prog_java.m4
--- m4/ac_prog_java.m4	27 May 2008 19:25:32 -0000	1.1
+++ m4/ac_prog_java.m4	21 Jun 2008 19:47:38 -0000
@@ -2,13 +2,14 @@
 dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_prog_java.html
 dnl
 dnl Changes for gjdoc: check for "kaffe, gij, java", not only "kaffe, java"
+dnl Changes for GNU Classpath: check for "cacao, jamvm" as well
 dnl
 AC_DEFUN([AC_PROG_JAVA],[
 AC_REQUIRE([AC_EXEEXT])dnl
 if test x$JAVAPREFIX = x; then
-        test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT gij$EXEEXT java$EXEEXT)
+        test x$JAVA = x && AC_CHECK_PROGS(JAVA, cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT)
 else
-        test x$JAVA = x && AC_CHECK_PROGS(JAVA, kaffe$EXEEXT gij$EXEEXT java$EXEEXT, $JAVAPREFIX)
+        test x$JAVA = x && AC_CHECK_PROGS(JAVA, cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT, $JAVAPREFIX)
 fi
 test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH])
 AC_PROG_JAVA_WORKS
Index: m4/ac_prog_javac.m4
===================================================================
RCS file: /sources/classpath/classpath/m4/ac_prog_javac.m4,v
retrieving revision 1.4
diff -u -u -r1.4 ac_prog_javac.m4
--- m4/ac_prog_javac.m4	21 Feb 2008 21:07:19 -0000	1.4
+++ m4/ac_prog_javac.m4	21 Jun 2008 19:47:38 -0000
@@ -36,10 +36,12 @@
 
 AC_DEFUN([AC_PROG_JAVAC],[
 AC_REQUIRE([AC_EXEEXT])dnl
+ECJ_OPTS="-warn:-deprecation,serial,unusedImport"
+JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"
 if test "x$JAVAPREFIX" = x; then
-        test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, ["ecj$EXEEXT -warn:-deprecation,serial,unusedImport"] ["ecj-3.3$EXEEXT -warn:-deprecation,serial,unusedImport"] ["ecj-3.2$EXEEXT -warn:-deprecation,serial,unusedImport"] ["javac$EXEEXT -Xlint:unchecked"] "gcj$EXEEXT -C")
+        test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, ["ecj$EXEEXT $ECJ_OPTS"] ["ecj-3.3$EXEEXT $ECJ_OPTS"] ["ecj-3.2$EXEEXT $ECJ_OPTS"] ["javac$EXEEXT $JAVAC_OPTS"] "gcj$EXEEXT -C")
 else
-        test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, ["ecj$EXEEXT -warn:-deprecation,serial,unusedImport"] ["ecj-3.3$EXEEXT -warn:-deprecation,serial,unusedImport"] ["ecj-3.2$EXEEXT -warn:-deprecation,serial,unusedImport"] ["javac$EXEEXT -Xlint:unchecked"] "gcj$EXEEXT -C", $JAVAPREFIX)
+        test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, ["ecj$EXEEXT $ECJ_OPTS"] ["ecj-3.3$EXEEXT $ECJ_OPTS"] ["ecj-3.2$EXEEXT $ECJ_OPTS"] ["javac$EXEEXT $JAVAC_OPTS"] "gcj$EXEEXT -C", $JAVAPREFIX)
 fi
 test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
 AC_PROG_JAVAC_WORKS


More information about the Classpath-patches mailing list