diff options
author | Andrew John Hughes <[email protected]> | 2010-12-01 23:57:54 +0000 |
---|---|---|
committer | Andrew John Hughes <[email protected]> | 2010-12-01 23:57:54 +0000 |
commit | bbf253ee117643e55adcaec29d6d06d45820bad7 (patch) | |
tree | e4716080a98ce984cd9aec665fc9acad48fb5ab3 | |
parent | 3a5bedeee5bb49232b75163fa7d60a0cbb22f89a (diff) |
Detect unpatched AppletViewerPanel so we fail early on plain OpenJDK.
2010-12-01 Andrew John Hughes <[email protected]>
* acinclude.m4:
(IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE):
New check to ensure sun.applet.AppletViewerPanel
is public (via the patch in IcedTea, applet_hole.patch).
* configure.ac: Invoke the above macro. Don't call
IT_CHECK_FOR_CLASS for the same class (the above macro
handles this too).
* README: Mention this limitation.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | README | 15 | ||||
-rw-r--r-- | acinclude.m4 | 62 | ||||
-rw-r--r-- | configure.ac | 4 |
4 files changed, 85 insertions, 7 deletions
@@ -1,3 +1,14 @@ +2010-12-01 Andrew John Hughes <[email protected]> + + * acinclude.m4: + (IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE): + New check to ensure sun.applet.AppletViewerPanel + is public (via the patch in IcedTea, applet_hole.patch). + * configure.ac: Invoke the above macro. Don't call + IT_CHECK_FOR_CLASS for the same class (the above macro + handles this too). + * README: Mention this limitation. + 2010-12-01 Andrew Su <[email protected]> * NEWS: Added controlpanel for modifying deployments.properties @@ -77,12 +77,17 @@ The following locations are checked for a JDK: * /usr/lib/jvm/java-gcj * /usr/lib/jvm/gcj-jdk * /usr/lib/jvm/cacao -in the order given above. Some currently fail. +in the order given above. -Most targets in IcedTea create stamp files in the stamps directory to -determine what and when dependencies were compiled. Each target has a -corresponding clean-x target which removes the output and the stamp -file, allowing it to be rebuilt. +At present, some of these options fail due to sun.* classes required +by IcedTea-Web. Upstream OpenJDK will only be able to compile +IcedTea-Web if the patch applet_hole.patch from IcedTea has been +applied. + +Most targets in IcedTea-Web create stamp files in the stamps directory +to determine what and when dependencies were compiled. Each target +has a corresponding clean-x target which removes the output and the +stamp file, allowing it to be rebuilt. Build Modification Options ========================== diff --git a/acinclude.m4 b/acinclude.m4 index 67ae380..2e488f9 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -605,3 +605,65 @@ EOF AC_SUBST(JAVADOC_KNOWS_J_OPTIONS) AM_CONDITIONAL([JAVADOC_SUPPORTS_J_OPTIONS], test x"${JAVADOC_KNOWS_J_OPTIONS}" = "xyes") ]) + +dnl Checks that sun.applet.AppletViewerPanel is available +dnl and public (via the patch in IcedTea6, applet_hole.patch) +dnl Can be removed when that is upstream or unneeded +AC_DEFUN([IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE],[ +AC_REQUIRE([IT_FIND_JAVAC]) +AC_REQUIRE([IT_FIND_JAVA]) +AC_CACHE_CHECK([if sun.applet.AppletViewerPanel is available and public], it_cv_applet_hole, [ +CLASS=TestAppletViewer.java +BYTECODE=$(echo $CLASS|sed 's#\.java##') +mkdir -p tmp.$$ +cd tmp.$$ +cat << \EOF > $CLASS +[/* [#]line __oline__ "configure" */ +import java.lang.reflect.Modifier; + +public class TestAppletViewer +{ + public static void main(String[] args) + { + try + { + Class<?> clazz = Class.forName("sun.applet.AppletViewerPanel"); + if (Modifier.isPublic(clazz.getModifiers())) + { + System.err.println("Found public sun.applet.AppletViewerPanel"); + System.exit(0); + } + System.err.println("Found non-public sun.applet.AppletViewerPanel"); + System.exit(2); + } + catch (ClassNotFoundException e) + { + System.err.println("Could not find sun.applet.AppletViewerPanel"); + System.exit(1); + } + } +} +] +EOF +if $JAVAC -cp . $JAVACFLAGS -nowarn $CLASS >&AS_MESSAGE_LOG_FD 2>&1; then + if $JAVA -classpath . $BYTECODE >&AS_MESSAGE_LOG_FD 2>&1; then + it_cv_applet_hole=yes; + else + it_cv_applet_hole=$?; + fi +else + it_cv_applet_hole=3; +fi +]) +rm -f $CLASS *.class +cd .. +rmdir tmp.$$ +if test x"${it_cv_applet_hole}" = "x1"; then + AC_MSG_ERROR([sun.applet.AppletViewerPanel is not available.]) +elif test x"${it_cv_applet_hole}" = "x2"; then + AC_MSG_ERROR([sun.applet.AppletViewerPanel is not public.]) +elif test x"${it_cv_applet_hole}" = "x3"; then + AC_MSG_ERROR([Compilation failed. See config.log.]) +fi +AC_PROVIDE([$0])dnl +]) diff --git a/configure.ac b/configure.ac index e380fb6..e3e825e 100644 --- a/configure.ac +++ b/configure.ac @@ -59,7 +59,7 @@ dnl IT573 - Plugin depends on sun.awt,X11.XEmbeddedFrame.java dnl IT574 - Plugin depends on sun.misc.Ref dnl IT575 - Plugin depends on com.sun/jndi.toolkit.url.UrlUtil dnl IT576 - Plugin depends on sun.applet.AppletImageRef - +dnl IT578 - Remove need for patching AppletPanel for Plugin/Webstart IT_CHECK_FOR_CLASS(JAVA_UTIL_JAR_PACK200, [java.util.jar.Pack200]) IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEMANAGER, [java.net.CookieManager]) IT_CHECK_FOR_CLASS(JAVA_NET_HTTPCOOKIE, [java.net.HttpCookie]) @@ -69,7 +69,6 @@ IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_SECURITYCONSTANTS, [sun.security.util.Secur IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_HOSTNAMECHECKER, [sun.security.util.HostnameChecker]) IT_CHECK_FOR_CLASS(SUN_SECURITY_X509_X500NAME, [sun.security.x509.X500Name]) IT_CHECK_FOR_CLASS(SUN_MISC_BASE64ENCODER, [sun.misc.BASE64Encoder]) -IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETVIEWERPANEL, [sun.applet.AppletViewerPanel]) IT_CHECK_FOR_CLASS(SUN_SECURITY_VALIDATOR_VALIDATOREXCEPTION, [sun.security.validator.ValidatorException]) IT_CHECK_FOR_CLASS(COM_SUN_NET_SSL_INTERNAL_SSL_X509EXTENDEDTRUSTMANAGER, [com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager]) @@ -77,5 +76,6 @@ IT_CHECK_FOR_CLASS(SUN_AWT_X11_XEMBEDDEDFRAME, [sun.awt.X11.XEmbeddedFrame]) IT_CHECK_FOR_CLASS(SUN_MISC_REF, [sun.misc.Ref]) IT_CHECK_FOR_CLASS(COM_SUN_JNDI_TOOLKIT_URL_URLUTIL, [com.sun.jndi.toolkit.url.UrlUtil]) IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef]) +IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE AC_OUTPUT |