changeset 1703:b12e1a83a817

Drop out of configure with an error if Zero/Shark and the original HotSpot are enabled. 2010-03-11 Andrew John Hughes <ahughes@redhat.com> * acinclude.m4: (ENABLE_ZERO_BUILD): Require SET_SHARK_BUILD. Use AC_DEFUN_ONCE to ensure it isn't included twice. (SET_SHARK_BUILD): Print result when no argument is given. Use AC_DEFUN_ONCE to ensure it isn't included twice. (AC_CHECK_WITH_HOTSPOT_BUILD): Require ENABLE_ZERO_BUILD and error out if the original build is enabled along with Zero/Shark.
author Andrew John Hughes <ahughes@redhat.com>
date Thu, 11 Mar 2010 23:24:05 +0000
parents 6cb729c4a876
children 833ee1f40cf8
files ChangeLog acinclude.m4
diffstat 2 files changed, 22 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Mar 11 22:57:54 2010 +0000
+++ b/ChangeLog	Thu Mar 11 23:24:05 2010 +0000
@@ -1,4 +1,16 @@
-2010-03-10  Andrew John Hughes  <ahughes@redhat.com>
+2010-03-11  Andrew John Hughes  <ahughes@redhat.com>
+
+	* acinclude.m4:
+	(ENABLE_ZERO_BUILD): Require SET_SHARK_BUILD.
+	Use AC_DEFUN_ONCE to ensure it isn't included twice.
+	(SET_SHARK_BUILD): Print result when no
+	argument is given.  Use AC_DEFUN_ONCE to ensure it
+	isn't included twice.
+	(AC_CHECK_WITH_HOTSPOT_BUILD): Require
+	ENABLE_ZERO_BUILD and error out if the original
+	build is enabled along with Zero/Shark.
+
+2010-03-11  Andrew John Hughes  <ahughes@redhat.com>
 
 	Fix the normal (non-Zero/Shark) build with
 	the original HotSpot.
--- a/acinclude.m4	Thu Mar 11 22:57:54 2010 +0000
+++ b/acinclude.m4	Thu Mar 11 23:24:05 2010 +0000
@@ -673,8 +673,9 @@
  AC_SUBST([$1])
 ])
 
-AC_DEFUN([ENABLE_ZERO_BUILD],
+AC_DEFUN_ONCE([ENABLE_ZERO_BUILD],
 [
+  AC_REQUIRE([SET_SHARK_BUILD])
   AC_MSG_CHECKING(whether to use the zero-assembler port)
   use_zero=no
   AC_ARG_ENABLE([zero],
@@ -772,7 +773,7 @@
   AC_CONFIG_FILES([ergo.c])
 ])
 
-AC_DEFUN([SET_SHARK_BUILD],
+AC_DEFUN_ONCE([SET_SHARK_BUILD],
 [
   AC_MSG_CHECKING(whether to use the Shark JIT)
   AC_ARG_ENABLE([shark], [AS_HELP_STRING(--enable-shark, use Shark JIT)],
@@ -785,7 +786,8 @@
         use_shark=yes
         ;;
     esac
-  ])
+  ],
+  [use_shark=no])
 
   AC_MSG_RESULT($use_shark)
 
@@ -871,6 +873,7 @@
 
 AC_DEFUN([AC_CHECK_WITH_HOTSPOT_BUILD],
 [
+  AC_REQUIRE([ENABLE_ZERO_BUILD])
   DEFAULT_BUILD="default"
   AC_MSG_CHECKING([which HotSpot build to use])
   AC_ARG_WITH([hotspot-build],
@@ -889,6 +892,9 @@
   AC_MSG_RESULT([${HSBUILD}])
   AC_SUBST([HSBUILD])
   AM_CONDITIONAL(WITH_ALT_HSBUILD, test "x${HSBUILD}" != "xoriginal")
+  if test "x${HSBUILD}" = "xoriginal" && test "x${use_zero}" = "xyes"; then
+    AC_MSG_ERROR([Zero/Shark is not supported with the original HotSpot (hs11).])
+  fi
 ])
 
 AC_DEFUN([WITH_HOTSPOT_SRC_ZIP],