summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2008-02-12 22:30:18 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2008-02-12 22:30:18 +0000
commitc16bf0bb4b41362a6f0a35fb1d61744f1487bfcb (patch)
tree188e06a0aa1bff0a13e6de0323300a699a78496c
parentd6eb5ba5f739900a8947990e17fd9de439e70711 (diff)
downloadclasspath-c16bf0bb4b41362a6f0a35fb1d61744f1487bfcb.tar.gz
2008-02-11 Andrew John Hughes <gnu_andrew@member.fsf.org>
PR classpath/34578: * NEWS: Mention javah and javac build changes. * configure.ac: Call AC_PROG_JAVAC and CLASSPATH_JAVAC_MEM_CHECK instead of CLASSPATH_FIND_JAVAC. * examples/Makefile.am: Simplify compiler choice to just use JAVAC. * lib/Makefile.am: Likewise, but with JAVAC_MEM_OPT too. * m4/ac_prog_javac.m4: New file. * m4/ac_prog_javac_works.m4: Likewise. * m4/acinclude.m4: (CLASSPATH_FIND_JAVAC): Removed. (CLASSPATH_WITH_GCJ): Removed. (CLASSPATH_CHECK_GCJ): Removed. (CLASSPATH_WITH_JIKES): Removed. (CLASSPATH_CHECK_JIKES): Removed. (CLASSPATH_WITH_KJC): Removed. (CLASSPATH_CHECK_KJC): Removed. (CLASSPATH_WITH_ECJ): Removed. (CLASSPATH_CHECK_ECJ): Removed. (CLASSPATH_WITH_JAVAC): Removed. (CLASSPATH_CHECK_JAVAC): Removed. (CLASSPATH_JAVAC_MEM_CHECK): Added. * tools/Makefile.am: Simplify compiler choice to just javac.
-rw-r--r--ChangeLog27
-rw-r--r--NEWS8
-rw-r--r--configure.ac3
-rw-r--r--examples/Makefile.am19
-rw-r--r--lib/Makefile.am26
-rw-r--r--m4/ac_prog_javac.m447
-rw-r--r--m4/ac_prog_javac_works.m440
-rw-r--r--m4/acinclude.m4288
-rwxr-xr-xtools/Makefile.am10
9 files changed, 144 insertions, 324 deletions
diff --git a/ChangeLog b/ChangeLog
index 36b218cf5..0f2978b33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2008-02-11 Andrew John Hughes <gnu_andrew@member.fsf.org>
+
+ PR classpath/34578:
+ * NEWS: Mention javah and javac build changes.
+ * configure.ac: Call AC_PROG_JAVAC and
+ CLASSPATH_JAVAC_MEM_CHECK instead of CLASSPATH_FIND_JAVAC.
+ * examples/Makefile.am: Simplify compiler choice
+ to just use JAVAC.
+ * lib/Makefile.am: Likewise, but with JAVAC_MEM_OPT too.
+ * m4/ac_prog_javac.m4: New file.
+ * m4/ac_prog_javac_works.m4: Likewise.
+ * m4/acinclude.m4:
+ (CLASSPATH_FIND_JAVAC): Removed.
+ (CLASSPATH_WITH_GCJ): Removed.
+ (CLASSPATH_CHECK_GCJ): Removed.
+ (CLASSPATH_WITH_JIKES): Removed.
+ (CLASSPATH_CHECK_JIKES): Removed.
+ (CLASSPATH_WITH_KJC): Removed.
+ (CLASSPATH_CHECK_KJC): Removed.
+ (CLASSPATH_WITH_ECJ): Removed.
+ (CLASSPATH_CHECK_ECJ): Removed.
+ (CLASSPATH_WITH_JAVAC): Removed.
+ (CLASSPATH_CHECK_JAVAC): Removed.
+ (CLASSPATH_JAVAC_MEM_CHECK): Added.
+ * tools/Makefile.am: Simplify compiler choice
+ to just javac.
+
2008-02-12 Roman Kennke <kennke@aicas.com>
* java/awt/color/ICC_Profile.java
diff --git a/NEWS b/NEWS
index bcf40d495..be47433c1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,13 @@
New in release 0.97
+Build changes:
+
+* A copy of javah (to produce C header files from Java source code)
+is now required to generate the files in include.
+* The javac check has been changed so that it attempts to find ecj,
+javac and gcj (in that order). You may override this by using
+JAVAC=<preferred javac>
+
Runtime interface changes:
* Removed VMFloat.floatToIntBits amd VMDouble.doubleToLongBits.
diff --git a/configure.ac b/configure.ac
index 73c88ad58..787c8842a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -728,7 +728,8 @@ if test "x${COMPILE_JNI}" = xyes; then
AC_CONFIG_LINKS([$ac_config_links_1])
fi
-CLASSPATH_FIND_JAVAC
+AC_PROG_JAVAC
+CLASSPATH_JAVAC_MEM_CHECK
CLASSPATH_WITH_CLASSLIB
diff --git a/examples/Makefile.am b/examples/Makefile.am
index a3cf1b75a..56b3c4577 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,24 +1,7 @@
## Input file for automake to generate the Makefile.in used by configure
GLIBJ_CLASSPATH='$(top_builddir)/lib/glibj.zip'
-# Setup the compiler to use the GNU Classpath library we just build
-#if FOUND_GCJ
-#JCOMPILER = $(GCJ) --bootclasspath '$(top_builddir)/lib' --classpath . -C
-#else
-#if FOUND_JIKES
-#JCOMPILER = $(JIKES) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(top_builddir)/lib:.
-#else
-if FOUND_ECJ
-JCOMPILER = $(ECJ) -1.5 -encoding UTF-8 -warn:-deprecation,serial,typeHiding,unchecked,unused,varargsCast -bootclasspath $(GLIBJ_CLASSPATH) -classpath '$(top_builddir)/tools/tools.zip'
-else
-if FOUND_JAVAC
-JCOMPILER = $(JAVAC) -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath '$(top_builddir)/tools/tools.zip'
-else
-JCOMPILER = echo "No compiler found" 1>&2; exit 1
-#endif
-#endif
-endif
-endif
+JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath '$(top_builddir)/tools/tools.zip'
# All our example java source files
EXAMPLE_JAVA_FILES = $(srcdir)/gnu/classpath/examples/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*.java $(srcdir)/gnu/classpath/examples/*/*/*/*.java
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 71cbe9ef9..429caf005 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -8,31 +8,7 @@ sinclude $(JAVA_DEPEND)
compile_classpath = $(vm_classes):$(top_srcdir):$(top_srcdir)/external/w3c_dom:$(top_srcdir)/external/sax:$(top_srcdir)/external/relaxngDatatype:$(top_srcdir)/external/jsr166:.:$(PATH_TO_GLIBJ_ZIP):$(PATH_TO_ESCHER)
# handling source to bytecode compiler programs like gcj, jikes and kjc
-if FOUND_ECJ
-JCOMPILER = $(ECJ) -1.5 -warn:-deprecation,serial,typeHiding,unchecked,unused -proceedOnError -bootclasspath '' -classpath $(compile_classpath) -d . @classes
-else
-if FOUND_JAVAC
-JCOMPILER = $(JAVAC) $(JAVAC_OPTS) -bootclasspath '' -classpath $(compile_classpath) -d . @classes
-#else
-#if FOUND_GCJ
-## This should never be used when gcj is the compiler.
-## See the compile-classes target.
-#JCOMPILER = exit 1
-#else
-#if FOUND_JIKES
-#JCOMPILER = $(JIKES) $(JIKESWARNINGS) +F $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(compile_classpath) -d . @classes
-#else
-#if FOUND_KJC
-### FIXME: from what I can tell, kjc does not support a -encoding option.
-#JCOMPILER = $(KJC) -classpath .:$(USER_CLASSLIB) -d . @classes
-else
-JCOMPILER = echo "No compiler found" 1>&2; exit 1
-#endif
-#endif # FOUND_KJC
-#endif # FOUND_GCJ
-#endif # FOUND_JIKES
-endif # FOUND_JAVAC
-endif # FOUND_ECJ
+JCOMPILER = $(JAVAC) $(JAVACFLAGS) $(JAVAC_MEM_OPT) -source 1.5 -target 1.5 -bootclasspath '' -classpath $(compile_classpath) -d . @classes
if CREATE_COLLECTIONS
COLLECTIONS = collections.jar
diff --git a/m4/ac_prog_javac.m4 b/m4/ac_prog_javac.m4
new file mode 100644
index 000000000..8215808c6
--- /dev/null
+++ b/m4/ac_prog_javac.m4
@@ -0,0 +1,47 @@
+dnl @synopsis AC_PROG_JAVAC
+dnl
+dnl AC_PROG_JAVAC tests an existing Java compiler. It uses the
+dnl environment variable JAVAC then tests in sequence various common
+dnl Java compilers. For political reasons, it starts with the free
+dnl ones.
+dnl
+dnl If you want to force a specific compiler:
+dnl
+dnl - at the configure.in level, set JAVAC=yourcompiler before calling
+dnl AC_PROG_JAVAC
+dnl
+dnl - at the configure level, setenv JAVAC
+dnl
+dnl You can use the JAVAC variable in your Makefile.in, with @JAVAC@.
+dnl
+dnl *Warning*: its success or failure can depend on a proper setting of
+dnl the CLASSPATH env. variable.
+dnl
+dnl TODO: allow to exclude compilers (rationale: most Java programs
+dnl cannot compile with some compilers like guavac).
+dnl
+dnl Note: This is part of the set of autoconf M4 macros for Java
+dnl programs. It is VERY IMPORTANT that you download the whole set,
+dnl some macros depend on other. Unfortunately, the autoconf archive
+dnl does not support the concept of set of macros, so I had to break it
+dnl for submission. The general documentation, as well as the sample
+dnl configure.in, is included in the AC_PROG_JAVA macro.
+dnl
+dnl @category Java
+dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
+dnl @version 2000-07-19
+dnl @license GPLWithACException
+dnl
+dnl Modified to remove jikes by Andrew John Hughes on 2008-02-11
+
+AC_DEFUN([AC_PROG_JAVAC],[
+AC_REQUIRE([AC_EXEEXT])dnl
+if test "x$JAVAPREFIX" = x; then
+ test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, ecj$EXEEXT javac$EXEEXT "gcj$EXEEXT -C")
+else
+ test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, ecj$EXEEXT javac$EXEEXT "gcj$EXEEXT -C", $JAVAPREFIX)
+fi
+test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])
+AC_PROG_JAVAC_WORKS
+AC_PROVIDE([$0])dnl
+])
diff --git a/m4/ac_prog_javac_works.m4 b/m4/ac_prog_javac_works.m4
new file mode 100644
index 000000000..757718e3f
--- /dev/null
+++ b/m4/ac_prog_javac_works.m4
@@ -0,0 +1,40 @@
+dnl @synopsis AC_PROG_JAVAC_WORKS
+dnl
+dnl Internal use ONLY.
+dnl
+dnl Note: This is part of the set of autoconf M4 macros for Java
+dnl programs. It is VERY IMPORTANT that you download the whole set,
+dnl some macros depend on other. Unfortunately, the autoconf archive
+dnl does not support the concept of set of macros, so I had to break it
+dnl for submission. The general documentation, as well as the sample
+dnl configure.in, is included in the AC_PROG_JAVA macro.
+dnl
+dnl @category Java
+dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>
+dnl @version 2000-07-19
+dnl @license GPLWithACException
+dnl
+dnl Modified to test for 1.5 by Andrew John Hughes on 2008-02-11
+
+AC_DEFUN([AC_PROG_JAVAC_WORKS],[
+AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
+JAVA_TEST=Colour.java
+CLASS_TEST=Colour.class
+cat << \EOF > $JAVA_TEST
+/* [#]line __oline__ "configure" */
+public enum Colour
+{
+RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET;
+}
+EOF
+if AC_TRY_COMMAND($JAVAC $JAVACFLAGS -source 1.5 -target 1.5 $JAVA_TEST) >/dev/null 2>&1; then
+ ac_cv_prog_javac_works=yes
+else
+ AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)])
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat $JAVA_TEST >&AC_FD_CC
+fi
+rm -f $JAVA_TEST $CLASS_TEST
+])
+AC_PROVIDE([$0])dnl
+])
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
index 2a1c17a45..3b56a2510 100644
--- a/m4/acinclude.m4
+++ b/m4/acinclude.m4
@@ -1,197 +1,6 @@
dnl Used by aclocal to generate configure
dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_FIND_JAVAC],
-[
- user_specified_ecj=
- user_specified_javac=
-
-dnl CLASSPATH_WITH_GCJ
-dnl CLASSPATH_WITH_JIKES
-dnl CLASSPATH_WITH_KJC
- CLASSPATH_WITH_ECJ
- CLASSPATH_WITH_JAVAC
-
- if test "x${user_specified_ecj}" = x; then
- AM_CONDITIONAL(FOUND_ECJ, test "x${ECJ}" != x)
- else
- AM_CONDITIONAL(FOUND_ECJ, test "x${user_specified_ecj}" = xecj && test "x${ECJ}" != x)
- fi
-
- if test "x${user_specified_javac}" = x; then
-dnl AM_CONDITIONAL(FOUND_GCJ, test "x${GCJ}" != x)
-dnl AM_CONDITIONAL(FOUND_JIKES, test "x${JIKES}" != x)
- AM_CONDITIONAL(FOUND_JAVAC, test "x${JAVAC}" != x)
- else
-dnl AM_CONDITIONAL(FOUND_GCJ, test "x${user_specified_javac}" = xgcj)
-dnl AM_CONDITIONAL(FOUND_JIKES, test "x${user_specified_javac}" = xjikes)
- AM_CONDITIONAL(FOUND_JAVAC, test "x${user_specified_javac}" = xjavac && test "x${JAVAC}" != x)
- fi
-
-dnl AM_CONDITIONAL(FOUND_KJC, test "x${user_specified_javac}" = xkjc)
-
-dnl if test "x${GCJ}" = x && test "x${JIKES}" = x && test "x${user_specified_javac}" != xkjc; then
- if test "x${ECJ}" = x && test "x${JAVAC}" = x && test "x${user_specified_ecj}" != xecj && test "x${user_specified_javac}" != xjavac; then
- AC_MSG_ERROR([cannot find javac, try --with-ecj or --with-javac])
- fi
-])
-
-dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_WITH_GCJ],
-[
- AC_ARG_WITH([gcj],
- [AS_HELP_STRING(--with-gcj,bytecode compilation with gcj)],
- [
- if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then
- CLASSPATH_CHECK_GCJ(${withval})
- else
- if test "x${withval}" != xno; then
- CLASSPATH_CHECK_GCJ
- fi
- fi
- user_specified_javac=gcj
- ],
- [
- CLASSPATH_CHECK_GCJ
- ])
- AC_SUBST(GCJ)
-])
-
-dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_CHECK_GCJ],
-[
- if test "x$1" != x; then
- if test -f "$1"; then
- GCJ="$1"
- else
- AC_PATH_PROG(GCJ, "$1")
- fi
- else
- AC_PATH_PROG(GCJ, "gcj")
- fi
- dnl Test the given GCJ, but use it as C (!) compiler to check version
- if test "x$GCJ" != x; then
- AC_MSG_CHECKING([gcj version 4.0])
- AC_LANG_PUSH([C])
- AC_LANG_CONFTEST(
- [[#if __GNUC__ <= 3
- #error GCJ 4.0.0 or higher is required
- #endif
- ]])
- $GCJ -E conftest.c > /dev/null
- gcj_4_result=$?
- if test "x$gcj_4_result" = "x0"; then
- AC_MSG_RESULT([4.0 or higher found])
- else
- AC_MSG_WARN([4.0 or higher required])
- fi
- AC_LANG_POP
- fi
-])
-
-dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_WITH_JIKES],
-[
- AC_ARG_WITH([jikes],
- [AS_HELP_STRING(--with-jikes,bytecode compilation with jikes)],
- [
- if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then
- CLASSPATH_CHECK_JIKES(${withval})
- else
- if test "x${withval}" != xno; then
- CLASSPATH_CHECK_JIKES
- fi
- fi
- user_specified_javac=jikes
- ],
- [
- CLASSPATH_CHECK_JIKES
- ])
- AC_SUBST(JIKES)
-])
-
-dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_CHECK_JIKES],
-[
- if test "x$1" != x; then
- if test -f "$1"; then
- JIKES="$1"
- else
- AC_PATH_PROG(JIKES, "$1")
- fi
- else
- AC_PATH_PROG(JIKES, "jikes")
- fi
- if test "x$JIKES" != "x"; then
- dnl Require at least version 1.19
- AC_MSG_CHECKING(jikes version)
- JIKES_VERSION=`$JIKES --version | awk '/^Jikes Compiler/' | cut -d ' ' -f 5`
- JIKES_VERSION_MAJOR=`echo "$JIKES_VERSION" | cut -d '.' -f 1`
- JIKES_VERSION_MINOR=`echo "$JIKES_VERSION" | cut -d '.' -f 2`
- if expr "$JIKES_VERSION_MAJOR" = 1 > /dev/null; then
- if expr "$JIKES_VERSION_MINOR" \< 19 > /dev/null; then
- JIKES=""
- fi
- fi
- if test "x$JIKES" != "x"; then
- AC_MSG_RESULT($JIKES_VERSION)
- else
- AC_MSG_WARN($JIKES_VERSION: jikes 1.19 or higher required)
- fi
-
- JIKESENCODING=
- if test -n "`$JIKES --help 2>&1 | grep encoding`"; then
- JIKESENCODING='-encoding UTF-8'
- fi
- AC_SUBST(JIKESENCODING)
-
- JIKESWARNINGS="+Pno-switchcheck"
- if test "x$JIKES_VERSION_MAJOR" = x"1" ; then
- if ! test "x$JIKES_VERSION_MINOR" = x"19"; then
- JIKESWARNINGS="$JIKESWARNINGS +Pno-shadow"
- fi
- fi
- AC_SUBST(JIKESWARNINGS)
-
- fi
-])
-
-dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_WITH_KJC],
-[
- AC_ARG_WITH([kjc],
- [AS_HELP_STRING(--with-kjc,bytecode compilation with kjc)],
- [
- if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then
- CLASSPATH_CHECK_KJC(${withval})
- else
- if test "x${withval}" != xno; then
- CLASSPATH_CHECK_KJC
- fi
- fi
- user_specified_javac=kjc
- ],
- [
- CLASSPATH_CHECK_KJC
- ])
- AC_SUBST(KJC)
-])
-
-dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_CHECK_KJC],
-[
- if test "x$1" != x; then
- if test -f "$1"; then
- KJC="$1"
- else
- AC_PATH_PROG(KJC, "$1")
- fi
- else
- AC_PATH_PROG(KJC, "kJC")
- fi
-])
-
-dnl -----------------------------------------------------------
AC_DEFUN([CLASSPATH_WITH_JAVAH],
[
AC_ARG_WITH([javah],
@@ -369,92 +178,29 @@ AC_DEFUN([REGEN_WITH_JAY],
])
dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_WITH_ECJ],
+AC_DEFUN([CLASSPATH_JAVAC_MEM_CHECK],
[
- AC_ARG_WITH([ecj],
- [AS_HELP_STRING(--with-ecj,bytecode compilation with ecj)],
- [
- if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then
- CLASSPATH_CHECK_ECJ(${withval})
- else
- if test "x${withval}" != xno; then
- CLASSPATH_CHECK_ECJ
- fi
- fi
- user_specified_ecj=ecj
- ],
- [
- CLASSPATH_CHECK_ECJ
- ])
- AC_SUBST(ECJ)
-])
-
-dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_CHECK_ECJ],
-[
- if test "x$1" != x; then
- if test -f "$1"; then
- ECJ="$1"
- else
- AC_PATH_PROG(ECJ, "$1")
- fi
- else
- AC_PATH_PROG(ECJ, "ecj")
- fi
-])
-
-dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_WITH_JAVAC],
-[
- AC_ARG_WITH([javac],
- [AS_HELP_STRING(--with-javac,bytecode compilation with javac)],
- [
- if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then
- CLASSPATH_CHECK_JAVAC(${withval})
- else
- if test "x${withval}" != xno; then
- CLASSPATH_CHECK_JAVAC
- fi
- fi
- user_specified_javac=javac
- ],
- [
- CLASSPATH_CHECK_JAVAC
- ])
- AC_SUBST(JAVAC)
- AC_SUBST(JAVAC_OPTS)
-])
-
-dnl -----------------------------------------------------------
-AC_DEFUN([CLASSPATH_CHECK_JAVAC],
-[
- if test "x$1" != x; then
- JAVAC="$1"
- else
- AC_PATH_PROG(JAVAC, "javac")
- fi
- dnl Test the given javac
- AC_MSG_CHECKING([if javac is 1.5-capable])
- cat > Colour.java << EOF
-public enum Colour {
-RED, ORANGE, YELLOW, GREEN, BLUE, INDIGO, VIOLET;
-}
+ JAVA_TEST=Test.java
+ CLASS_TEST=Test.class
+ cat << \EOF > $JAVA_TEST
+ /* [#]line __oline__ "configure" */
+ public class Test
+ {
+ public static void main(String[] args)
+ {
+ System.out.println("Hello World");
+ }
+ }
EOF
- $JAVAC -sourcepath '' Colour.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 -sourcepath '' Colour.java
+ $JAVAC $JAVACFLAGS -J-Xmx512M -sourcepath '' $JAVA_TEST
javac_result=$?
if test "x$javac_result" = "x0"; then
AC_MSG_RESULT([yes])
- JAVAC_OPTS="-J-Xmx512M"
+ JAVAC_MEM_OPT="-J-Xmx512M"
else
- AC_MSG_RESULT([javac doesn't support -J])
+ AC_MSG_RESULT([no])
fi
- rm -f Colour.java Colour.class
+ rm -f $JAVA_TEST $CLASS_TEST
+ AC_SUBST(JAVAC_MEM_OPT)
])
diff --git a/tools/Makefile.am b/tools/Makefile.am
index f63c63166..d6724ef60 100755
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -4,15 +4,7 @@ GLIBJ_BOOTCLASSPATH='$(top_builddir)/lib/glibj.zip'
GLIBJ_CLASSPATH=asm
# Setup the compiler to use the GNU Classpath library we just built.
-if FOUND_ECJ
-JCOMPILER = $(ECJ) -1.5 -encoding UTF-8 -warn:-deprecation,serial,typeHiding,unchecked,unused,varargsCast -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath .:$(GLIBJ_CLASSPATH)
-else
-if FOUND_JAVAC
-JCOMPILER = $(JAVAC) -encoding UTF-8 -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath $(GLIBJ_CLASSPATH)
-else
-error dunno how to setup the JCOMPILER and compile
-endif
-endif
+JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath $(GLIBJ_CLASSPATH)
if CREATE_WRAPPERS
bin_SCRIPTS =