This completes adressing PR27649 in combination with
http://developer.classpath.org/pipermail/classpath-patches/2006-June/002635.html
This adds a --enable-standalone-crypto configuration option which
creates an additional jar with the crypto providers for use by
non-classpath based VMs.
changelog:
2006-06-09 Vivek Lakshmanan <[EMAIL PROTECTED]>
* configure.ac:
Add --enable-standalone-crypto option (PR27649).
* lib/Makefile.am:
Create gnu-crypto.jar when CREATE_STANDALONE_CRYPTO is true.
Allow gnu-crypto.jar to be cleaned up.
Thanks,
Vivek
Index: configure.ac
===================================================================
RCS file: /sources/classpath/classpath/configure.ac,v
retrieving revision 1.160
diff -u -r1.160 configure.ac
--- configure.ac 7 Jun 2006 15:09:39 -0000 1.160
+++ configure.ac 9 Jun 2006 17:14:32 -0000
@@ -55,6 +55,22 @@
[COMPILE_COLLECTIONS=no])
AM_CONDITIONAL(CREATE_COLLECTIONS, test "x${COMPILE_COLLECTIONS}" = xyes)
+dnl ------------------------------------------------------------
+dnl Enables the creation of a standalone crypto jar with all
+dnl crypto providers for use by VMs that may not use
+dnl GNU-classpath (disabled by default).
+dnl ------------------------------------------------------------
+AC_ARG_ENABLE([standalone-crypto],
+ [AS_HELP_STRING(--enable-standalone-crypto,create additional crypto jar [default=no])],
+ [case x"${enableval}" in
+ xyes) ENABLE_STANDALONE_CRYPTO=yes ;;
+ xno) ENABLE_STANDALONE_CRYPTO=no ;;
+ x) ENABLE_STANDALONE_CRYPTO=yes ;;
+ *) ENABLE_STANDALONE_CRYPTO=yes ;;
+ esac],
+ [ENABLE_STANDALONE_CRYPTO=no])
+AM_CONDITIONAL(CREATE_STANDALONE_CRYPTO, test "x${ENABLE_STANDALONE_CRYPTO}" = xyes)
+
dnl -----------------------------------------------------------
dnl Enable JNI libraries (enabled by default)
dnl -----------------------------------------------------------
@@ -283,6 +299,10 @@
AC_CONFIG_COMMANDS([mkcollections.pl],[chmod 755 lib/mkcollections.pl])
fi
+if test "x${ENABLE_STANDALONE_CRYPTO}" = xyes; then
+ AC_SUBST(STANDALONE_CRYPTO_PREFIX, "javax/crypto gnu/javax/crypto gnu/java/security gnu/classpath/ByteArray* gnu/classpath/debug gnu/java/io/Base64InputStream*")
+fi
+
if test "x${COMPILE_JNI}" = xyes; then
AC_HEADER_STDC
Index: lib/Makefile.am
===================================================================
RCS file: /sources/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.117
diff -u -r1.117 Makefile.am
--- lib/Makefile.am 5 Apr 2006 22:12:01 -0000 1.117
+++ lib/Makefile.am 9 Jun 2006 17:14:36 -0000
@@ -55,9 +55,21 @@
fi
endif # CREATE_COLLECTIONS
+
+if CREATE_STANDALONE_CRYPTO
+STANDALONE_CRYPTO = gnu-crypto.jar
+
+gnu-crypto.jar: compile-classes
+ if test "$(FASTJAR)" != ""; then \
+ $(FASTJAR) cf $@ @STANDALONE_CRYPTO_PREFIX@; \
+ else \
+ echo "fastjar not found" > gnu-crypto.jar; \
+ fi
+endif # CREATE_STANDALONE_CRYPTO
+
if INSTALL_GLIBJ_ZIP
-glibj_DATA = glibj.zip $(COLLECTIONS)
+glibj_DATA = glibj.zip $(COLLECTIONS) $(STANDALONE_CRYPTO)
endif # INSTALL_GLIBJ_ZIP
@@ -167,7 +179,7 @@
CLEANFILES = compile-classes resources classes \
glibj.zip classes.1 classes.2 \
$(top_builddir)/gnu/java/locale/LocaleData.java \
- $(JAVA_DEPEND)
+ $(JAVA_DEPEND) gnu-crypto.jar
clean-local:
-rm -rf gnu