summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@redhat.com>2006-03-03 17:40:43 +0000
committerThomas Fitzsimmons <fitzsim@redhat.com>2006-03-03 17:40:43 +0000
commit0c5acec995103361200f805acf839f09c7456183 (patch)
tree97a060528b7fd2a4e4194bfffb35541e90c6a87c
parent0134f9a8dfc2e2db93dc6301f723ccd82f89e9a1 (diff)
downloadclasspath-0c5acec995103361200f805acf839f09c7456183.tar.gz
2006-03-03 Thomas Fitzsimmons <fitzsim@redhat.com>
* NEWS: Add entry for --enable-collections. * configure.ac: Add --enable-collections option. * lib/Makefile.am (collections.jar): New target. (glibj_DATA): Add $(COLLECTIONS). * lib/mkcollections.pl.in (destpath): Set from COLLECTION_PREFIX configure substitution. (classpath): Read from command line. (javautilclasses): Remove BasicMapEntry. Add RandomAccess.
-rw-r--r--ChangeLog11
-rw-r--r--NEWS3
-rw-r--r--configure.ac22
-rw-r--r--lib/Makefile.am19
-rwxr-xr-xlib/mkcollections.pl.in6
5 files changed, 57 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 31434e432..3cb9ddae4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-03-03 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * NEWS: Add entry for --enable-collections.
+ * configure.ac: Add --enable-collections option.
+ * lib/Makefile.am (collections.jar): New target.
+ (glibj_DATA): Add $(COLLECTIONS).
+ * lib/mkcollections.pl.in (destpath): Set from COLLECTION_PREFIX
+ configure substitution.
+ (classpath): Read from command line.
+ (javautilclasses): Remove BasicMapEntry. Add RandomAccess.
+
2006-03-03 David Gilbert <david.gilbert@object-refinery.com>
* javax/swing/SpringLayout.java: Fixed API doc warnings.
diff --git a/NEWS b/NEWS
index 7fb69b12a..c31efb6c2 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,9 @@ New in release 0.21 (to be released)
* javax.imageio.plugins.bmp implementation.
+* Added --enable-collections configure option which builds
+ "collections.jar", a 1.1 VM compatibility jar.
+
Runtime interface changes:
* A new class, VMMath, is now available which separates the native
diff --git a/configure.ac b/configure.ac
index 95e049988..bd88839c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,20 @@ AC_CONFIG_HEADERS([include/config.h])
AC_PREFIX_DEFAULT(/usr/local/classpath)
dnl -----------------------------------------------------------
+dnl Enable collections.jar (disabled by default)
+dnl -----------------------------------------------------------
+AC_ARG_ENABLE([collections],
+ [AS_HELP_STRING(--enable-collections,create collections.jar [default=no])],
+ [case x"${enableval}" in
+ xyes) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
+ xno) COMPILE_COLLECTIONS=no ;;
+ x) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"gnu/java/util/collections\"" ;;
+ *) COMPILE_COLLECTIONS=yes; COLLECTIONS_PREFIX="\"${enableval}\"" ;;
+ esac],
+ [COMPILE_COLLECTIONS=no])
+AM_CONDITIONAL(CREATE_COLLECTIONS, test "x${COMPILE_COLLECTIONS}" = xyes)
+
+dnl -----------------------------------------------------------
dnl Enable JNI libraries (enabled by default)
dnl -----------------------------------------------------------
AC_ARG_ENABLE([jni],
@@ -234,6 +248,14 @@ dnl AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
+if test "x${COMPILE_COLLECTIONS}" = xyes; then
+ AC_PATH_PROG(PERL, [perl])
+ AC_SUBST(PERL)
+ AC_SUBST(COLLECTIONS_PREFIX)
+ AC_CONFIG_FILES([lib/mkcollections.pl])
+ AC_CONFIG_COMMANDS([mkcollections.pl],[chmod 755 lib/mkcollections.pl])
+fi
+
if test "x${COMPILE_JNI}" = xyes; then
AC_HEADER_STDC
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 1bf6fd21e..e2c495714 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -38,9 +38,26 @@ endif # FOUND_JIKES
JAVAH = $(USER_JAVAH) -jni -classpath .:$(USER_CLASSLIB)
+if CREATE_COLLECTIONS
+COLLECTIONS = collections.jar
+
+collections.jar: mkcollections.pl
+ ./mkcollections.pl $(top_srcdir)
+if FOUND_GCJ
+ $(GCJ) -C `$(FIND) $(COLLECTIONS_PREFIX) -name '*' -type f -print`
+else
+ $(JAVAC) `$(FIND) $(COLLECTIONS_PREFIX) -name '*' -type f -print`
+endif
+ if test "$(FASTJAR)" != ""; then \
+ $(FASTJAR) cf $@ $(COLLECTIONS_PREFIX); \
+ else \
+ echo "fastjar not found" > collections.jar; \
+ fi
+endif # CREATE_COLLECTIONS
+
if INSTALL_GLIBJ_ZIP
-glibj_DATA = glibj.zip
+glibj_DATA = glibj.zip $(COLLECTIONS)
endif # INSTALL_GLIBJ_ZIP
diff --git a/lib/mkcollections.pl.in b/lib/mkcollections.pl.in
index be81430c7..bd00f01f2 100755
--- a/lib/mkcollections.pl.in
+++ b/lib/mkcollections.pl.in
@@ -22,8 +22,8 @@
# the Free Software Foundation, 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA
-my $destpath=pop || "gnu/java/util/collections";
-my $classpath="..";
+my $destpath=@COLLECTIONS_PREFIX@;
+my $classpath=pop;
my @javalangclasses=qw(UnsupportedOperationException
Comparable);
my @javautilclasses=qw(AbstractCollection
@@ -33,7 +33,6 @@ my @javautilclasses=qw(AbstractCollection
AbstractSet
ArrayList
Arrays
- BasicMapEntry
List
Collection
Collections
@@ -48,6 +47,7 @@ my @javautilclasses=qw(AbstractCollection
Map
NoSuchElementException
Random
+ RandomAccess
Set
SortedMap
SortedSet