changeset 1596:0a1a8cd8eda3

Fold --with-icedtea, --with-icedtea-home and --with-openjdk-home into --with-openjdk. 2009-06-10 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: Remove duplicate WITH_ICEDTEA blocks. * acinclude.m4: (AC_CHECK_FOR_OPENJDK): Updated so that no turns off the option rather than dropping out. (AC_CHECK_FOR_ICEDTEA): Removed. * configure.ac: Remove --with-icedtea and --with-openjdk blocks and duplicate --with-icedtea logic.
author Andrew John Hughes <ahughes@redhat.com>
date Thu, 11 Jun 2009 18:02:04 +0100
parents 0b4d2e77cf97
children eb47e16e3ace
files ChangeLog Makefile.am acinclude.m4 configure.ac
diffstat 4 files changed, 33 insertions(+), 112 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jun 10 12:00:53 2009 -0400
+++ b/ChangeLog	Thu Jun 11 18:02:04 2009 +0100
@@ -1,3 +1,15 @@
+2009-06-10  Andrew John Hughes  <ahughes@redhat.com>
+	
+	* Makefile.am:
+	Remove duplicate WITH_ICEDTEA blocks.
+	* acinclude.m4:
+	(AC_CHECK_FOR_OPENJDK): Updated so that no
+	turns off the option rather than dropping out.
+	(AC_CHECK_FOR_ICEDTEA): Removed.
+	* configure.ac:
+	Remove --with-icedtea and --with-openjdk blocks
+	and duplicate --with-icedtea logic.
+
 2009-06-10  Omair Majid  <omajid@redhat.com>
 
 	* rt/net/sourceforge/jnlp/JNLPFile.java
--- a/Makefile.am	Wed Jun 10 12:00:53 2009 -0400
+++ b/Makefile.am	Thu Jun 11 18:02:04 2009 +0100
@@ -986,14 +986,9 @@
   BOOTSTRAP_DIRECTORY_STAMP =
   ICEDTEA_HOME = $(SYSTEM_OPENJDK_DIR)
 else
-if WITH_ICEDTEA
-  BOOTSTRAP_DIRECTORY_STAMP =
-  ICEDTEA_HOME = $(SYSTEM_ICEDTEA_DIR)
-else
   BOOTSTRAP_DIRECTORY_STAMP = stamps/bootstrap-directory.stamp
   ICEDTEA_HOME = $(abs_top_builddir)/bootstrap/icedtea
 endif
-endif
 
 # bootstrap/jdk1.6.0 to bootstrap/icedtea symlink.
 stamps/bootstrap-directory-symlink.stamp: $(BOOTSTRAP_DIRECTORY_STAMP)
@@ -1080,15 +1075,11 @@
 # OpenJDK Targets
 # ===============
 
-if WITH_ICEDTEA
+if WITH_OPENJDK
   MEMORY_LIMIT = -J-Xmx1024m
 else
-if WITH_OPENJDK
-  MEMORY_LIMIT = -J-Xmx512m
-else
   MEMORY_LIMIT =
 endif
-endif
 
 if WITH_CACAO
   ICEDTEA_BUILD_TARGET=j2se_only
--- a/acinclude.m4	Wed Jun 10 12:00:53 2009 -0400
+++ b/acinclude.m4	Thu Jun 11 18:02:04 2009 +0100
@@ -998,18 +998,20 @@
   AC_SUBST(SYSTEM_GCJ_DIR)
 ])
 
+dnl This option allows the initial build to be skipped, and a single build
+dnl to be completed using an existing OpenJDK installation.  It can be used
+dnl in three ways:
+dnl   * --with-openjdk: look for OpenJDK in one of a series of predefined dirs
+dnl   * --without-openjdk (default): do a full bootstrap, no OpenJDK required
+dnl   * --with-openjdk=${path}: use the OpenJDK installed in the specified location
 AC_DEFUN([AC_CHECK_FOR_OPENJDK],
 [
   AC_MSG_CHECKING([for an existing OpenJDK installation])
-  AC_ARG_WITH([openjdk-home],
-              [AS_HELP_STRING([--with-openjdk-home],
-                              [OpenJDK home directory \
-                               (default is /usr/lib/jvm/java-openjdk)])],
+  AC_ARG_WITH([openjdk],
+              [AS_HELP_STRING([--with-openjdk],
+                              [perform a quick build with an installed copy of OpenJDK])],
               [
-                if test "x${withval}" = xyes
-                then
-                  SYSTEM_OPENJDK_DIR=
-                elif test "x${withval}" = xno
+                if test "x${withval}" = xno
                 then
 	          SYSTEM_OPENJDK_DIR=
 	        else
@@ -1019,55 +1021,22 @@
               [
                 SYSTEM_OPENJDK_DIR=
               ])
-  if test -z "${SYSTEM_OPENJDK_DIR}"; then
-    for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk ; do
+  if test "x${SYSTEM_OPENJDK_DIR}" = xyes; then
+    for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk \
+    	       /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk \
+	       /usr/lib/jvm/java-icedtea ; do
        if test -d $dir; then
          SYSTEM_OPENJDK_DIR=$dir
 	 break
        fi
     done
+  elif ! test -z "${SYSTEM_OPENJDK_DIR}"; then
+    if ! test -d "${SYSTEM_OPENJDK_DIR}"; then
+      AC_MSG_ERROR("An OpenJDK home directory could not be found.")
+    fi
   fi
+  AM_CONDITIONAL(WITH_OPENJDK, test "x${SYSTEM_OPENJDK_DIR}" != x)
   AC_MSG_RESULT(${SYSTEM_OPENJDK_DIR})
-  if ! test -d "${SYSTEM_OPENJDK_DIR}"; then
-    AC_MSG_ERROR("An OpenJDK home directory could not be found.")
-  fi
   AC_SUBST(SYSTEM_OPENJDK_DIR)
 ])
 
-AC_DEFUN([AC_CHECK_FOR_ICEDTEA],
-[
-  AC_MSG_CHECKING(for an existing IcedTea installation)
-  AC_ARG_WITH([icedtea-home],
-              [AS_HELP_STRING([--with-icedtea-home],
-                              [IcedTea home directory \
-                               (default is /usr/lib/jvm/java-icedtea)])],
-              [
-                if test "x${withval}" = xyes
-                then
-                  SYSTEM_ICEDTEA_DIR=
-                elif test "x${withval}" = xno
-                then
-	          SYSTEM_ICEDTEA_DIR=
-	        else
-                  SYSTEM_ICEDTEA_DIR=${withval}
-                fi
-              ],
-              [
-                SYSTEM_ICEDTEA_DIR=
-              ])
-  if test -z "${SYSTEM_ICEDTEA_DIR}"; then
-    for dir in /usr/lib/jvm/java-icedtea /usr/lib/jvm/icedtea6 /usr/lib/jvm/java-6-openjdk ; do
-       if test -d $dir; then
-         SYSTEM_ICEDTEA_DIR=$dir
-	 break
-       fi
-    done
-  fi
-  AC_MSG_RESULT(${SYSTEM_ICEDTEA_DIR})
-  if ! test -d "${SYSTEM_ICEDTEA_DIR}"; then
-    AC_MSG_ERROR("An IcedTea home directory could not be found.")
-  fi
-  AC_SUBST(SYSTEM_ICEDTEA_DIR)
-])
-
-
--- a/configure.ac	Wed Jun 10 12:00:53 2009 -0400
+++ b/configure.ac	Thu Jun 11 18:02:04 2009 +0100
@@ -46,24 +46,7 @@
 AC_CHECK_WITH_HOTSPOT_BUILD
 AC_PATH_TOOL([LINUX32],[linux32])
 AC_CHECK_GCC_VERSION
-
-AC_MSG_CHECKING([whether to build using an existing installation of IcedTea])
-AC_ARG_WITH([icedtea],
-        [AS_HELP_STRING([--with-icedtea],
-                        [build IcedTea with system-installed IcedTea])],
-        [
-          if test "x${withval}" != xno
-          then
-            with_icedtea=true
-          else
-            with_icedtea=false
-          fi
-        ],
-        [
-          with_icedtea=false
-        ])
-AM_CONDITIONAL(WITH_ICEDTEA, test "${with_icedtea}" = true)
-AC_MSG_RESULT(${with_icedtea})
+AC_CHECK_FOR_OPENJDK
 
 AC_MSG_CHECKING([for a NetBeans installation])
 AC_ARG_WITH([netbeans-home],
@@ -83,24 +66,6 @@
 AC_MSG_RESULT([${SYSTEM_NETBEANS_DIR}])
 AC_SUBST(SYSTEM_NETBEANS_DIR)
 
-AC_MSG_CHECKING([whether to build using an existing installation of OpenJDK])
-AC_ARG_WITH([openjdk],
-        [AS_HELP_STRING([--with-openjdk],
-                        [build IcedTea with system-installed OpenJDK])],
-        [
-          if test "x${withval}" != xno
-          then
-            with_openjdk=true
-          else
-            with_openjdk=false
-          fi
-        ],
-        [
-          with_openjdk=false
-        ])
-AM_CONDITIONAL(WITH_OPENJDK, test "${with_openjdk}" = true)
-AC_MSG_RESULT(${with_openjdk})
-
 AC_MSG_CHECKING(for Ant home directory)
 AC_ARG_WITH([ant-home],
             [AS_HELP_STRING([--with-ant-home],
@@ -238,7 +203,6 @@
 
 if test "${with_openjdk}" = true
 then
-  AC_CHECK_FOR_OPENJDK
   JAVA=$SYSTEM_OPENJDK_DIR/bin/java
   AC_SUBST(JAVA)
   JAVAC=${SYSTEM_OPENJDK_DIR}/bin/javac
@@ -250,20 +214,6 @@
   RMIC=${SYSTEM_OPENJDK_DIR}/bin/rmic
   AC_SUBST(RMIC)
 else
-if test "${with_icedtea}" = true
-then
-  AC_CHECK_FOR_ICEDTEA
-  JAVA=$SYSTEM_ICEDTEA_DIR/bin/java
-  AC_SUBST(JAVA)
-  JAVAC=${SYSTEM_ICEDTEA_DIR}/bin/javac
-  AC_SUBST(JAVAC)
-  JAVAH=${SYSTEM_ICEDTEA_DIR}/bin/javah
-  AC_SUBST(JAVAH)
-  JAR=${SYSTEM_ICEDTEA_DIR}/bin/jar
-  AC_SUBST(JAR)
-  RMIC=${SYSTEM_ICEDTEA_DIR}/bin/rmic
-  AC_SUBST(RMIC)
-else
   AC_CHECK_FOR_GCJ_JDK
   FIND_JAVA
   FIND_JAVAC
@@ -277,7 +227,6 @@
   AC_CONFIG_FILES([javac], [chmod +x javac])
   AC_CONFIG_FILES([javap], [chmod +x javap])
 fi
-fi
 FIND_RHINO_JAR
 WITH_OPENJDK_SRC_ZIP
 WITH_HOTSPOT_SRC_ZIP