[m-rev.] diff: fix java grade stdlib compilation on Mac OS X

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Dec 14 16:47:10 AEDT 2011


Apparently, "other things" doesn't include the machines I tested the
previous change on :-(

Branches: main, 11.07

Fix compilation of the java grade on Mac OS X (and probably other things).

m4/mercury.m4:
 	When testing whether the Java compiler (actually runtime) supports
 	modifying the heap size, don't use the version with the quoted
 	runtime argument in the test in the configure script.

Julien.

Index: m4/mercury.m4
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/m4/mercury.m4,v
retrieving revision 1.2
diff -u -r1.2 mercury.m4
--- m4/mercury.m4	5 Dec 2011 04:43:30 -0000	1.2
+++ m4/mercury.m4	14 Dec 2011 05:44:37 -0000
@@ -419,11 +419,17 @@
  # The default maximum heap size is too small to build the standard library and
  # other programs so we need to increase it.  The option to do that is
  # non-standard so we have to check that it is accepted.
-AC_CACHE_VAL(mercury_cv_javac_flags_for_heap_size, [
-if test "$mercury_cv_java" = "yes"; then
-	AC_MSG_CHECKING(if the Java compiler accepts the max heap size option)
+AC_CACHE_VAL([mercury_cv_javac_flags_for_heap_size], [
+if test "$mercury_cv_java" = "yes"
+then
+	AC_MSG_CHECKING([if the Java compiler accepts the max heap size option])
+	# There are two versions of this.  The _test version is the one we test
+	# here.  The second one, with the escaped quotes, is the one that gets
+	# included in the output files.  The quotes are necessary in order for
+	# --restricted-command-line to work with the Java backend.
+	mercury_cv_javac_flags_for_heap_size_test="-J-Xmx256m"
  	mercury_cv_javac_flags_for_heap_size="-J\"-Xmx256m\""
-	if "$JAVAC" "$mercury_cv_javac_flags_for_heap_size" -version \
+	if "$JAVAC" "$mercury_cv_javac_flags_for_heap_size_test" -version \
                  2> /dev/null
          then
  		AC_MSG_RESULT(yes)

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list