summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2007-10-12 21:37:42 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2007-10-12 21:37:42 +0000
commit55d11b5361854fd1f3aea514b25f76d85abe3153 (patch)
tree8683ba3ecad72361dde3889bcb02d90a79213b50
parent087c1673781a83274e25506da7f0502df9a89b09 (diff)
downloadclasspath-55d11b5361854fd1f3aea514b25f76d85abe3153.tar.gz
2007-10-12 Andrew John Hughes <gnu_andrew@member.fsf.org>
PR classpath/33622: * lib/Makefile.am: Use JAVAC_ARGS variable. * m4/acinclude.m4: Check javac is 1.5 compliant and whether it supports -J.
-rw-r--r--ChangeLog7
-rw-r--r--lib/Makefile.am2
-rw-r--r--m4/acinclude.m425
3 files changed, 33 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 31fbc6cb1..326747d47 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-12 Andrew John Hughes <gnu_andrew@member.fsf.org>
+
+ PR classpath/33622:
+ * lib/Makefile.am: Use JAVAC_ARGS variable.
+ * m4/acinclude.m4: Check javac is 1.5 compliant
+ and whether it supports -J.
+
2007-10-12 Mario Torre <neugens@limasoftware.net>
* gnu/javax/swing/text/html/css/FontSize.java (mapPercent):
diff --git a/lib/Makefile.am b/lib/Makefile.am
index d147f5bd8..d76548cd5 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -12,7 +12,7 @@ if FOUND_ECJ
JCOMPILER = $(ECJ) -1.5 -warn:-deprecation,serial,typeHiding,unchecked,unused,varargsCast -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes
else
if FOUND_JAVAC
-JCOMPILER = $(JAVAC) -J-Xmx512M -bootclasspath '' -classpath $(compile_classpath) -d . @classes
+JCOMPILER = $(JAVAC) $(JAVAC_OPTS) -bootclasspath '' -classpath $(compile_classpath) -d . @classes
#else
#if FOUND_GCJ
## This should never be used when gcj is the compiler.
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index a9b6fd811..88a7faa32 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -444,6 +444,7 @@ AC_DEFUN([CLASSPATH_WITH_JAVAC],
CLASSPATH_CHECK_JAVAC
])
AC_SUBST(JAVAC)
+ AC_SUBST(JAVAC_OPTS)
])
dnl -----------------------------------------------------------
@@ -454,4 +455,28 @@ AC_DEFUN([CLASSPATH_CHECK_JAVAC],
else
AC_PATH_PROG(JAVAC, "javac")
fi
+ dnl Test the given javac
+ AC_MSG_CHECKING([if javac is 1.5-capable])
+ cat > conftest.java << EOF
+public class conftest {
+public static void main(String[] args) {
+java.util.List<String> l;
+}}
+EOF
+ $JAVAC conftest.java
+ javac_result=$?
+ if test "x$javac_result" = "x0"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_WARN([1.5 capable javac required])
+ fi
+ AC_MSG_CHECKING([whether javac supports -J])
+ $JAVAC -J-Xmx512M conftest.java
+ javac_result=$?
+ if test "x$javac_result" = "x0"; then
+ AC_MSG_RESULT([yes])
+ JAVAC_OPTS="-J-Xmx512M"
+ else
+ AC_MSG_RESULT([javac doesn't support -J])
+ fi
])