Mercurial > hg > release > icedtea-web-1.0
changeset 142:77c2b187b88f
Made compatible with both xulrunner versions
author | Jiri Vanek <jvanek@redhat.com> |
---|---|
date | Wed, 21 Dec 2011 11:17:42 +0100 |
parents | 8cb4e38427cc |
children | 1c3bf2c45775 |
files | ChangeLog acinclude.m4 configure.ac plugin/icedteanp/IcedTeaNPPlugin.cc |
diffstat | 4 files changed, 36 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Dec 08 16:20:51 2011 -0500 +++ b/ChangeLog Wed Dec 21 11:17:42 2011 +0100 @@ -1,3 +1,13 @@ +2011-12-21 Jiri Vanek <jvanek@redhat.com> + + * acinclude.m4: added definition of IT_CHECK_XULRUNNER_API_VERSION, + which tries to compile small program against new xulrunner api + * configure.ac: added call of IT_CHECK_XULRUNNER_API_VERSION + * plugin/icedteanp/IcedTeaNPPlugin.cc: (NP_GetMIMEDescription) + return type set-up by dependency on defined LEGACY_XULRUNNERAPI. + This one is set by IT_CHECK_XULRUNNER_API_VERSION during configure. + if defined, then old char* is used. New const char* is used otherwise. + 2011-12-08 Omair Majid <omajid@redhat.com> * netx/net/sourceforge/jnlp/Launcher.java
--- a/acinclude.m4 Thu Dec 08 16:20:51 2011 -0500 +++ b/acinclude.m4 Wed Dec 21 11:17:42 2011 +0100 @@ -385,6 +385,26 @@ AC_SUBST(PKGVERSION) ]) +AC_DEFUN_ONCE([IT_CHECK_XULRUNNER_API_VERSION], +[ + AC_MSG_CHECKING([for legacy xulrunner api]) + AC_LANG_PUSH(C++) + CXXFLAGS_BACKUP=$CXXFLAGS + CXXFLAGS=$CXXFLAGS" "$MOZILLA_CFLAGS + AC_TRY_COMPILE([ + #include <npfunctions.h> + const char* NP_GetMIMEDescription () + {return (char*) "yap!";} + ],[],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE([LEGACY_XULRUNNERAPI]) + ]) + CXXFLAGS=$CXXFLAGS_BACKUP + AC_LANG_POP(C++) +]) + AC_DEFUN([IT_CHECK_WITH_GCJ], [ AC_MSG_CHECKING([whether to compile ecj natively])
--- a/configure.ac Thu Dec 08 16:20:51 2011 -0500 +++ b/configure.ac Wed Dec 21 11:17:42 2011 +0100 @@ -78,5 +78,6 @@ 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 +IT_CHECK_XULRUNNER_API_VERSION AC_OUTPUT
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Dec 08 16:20:51 2011 -0500 +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Wed Dec 21 11:17:42 2011 +0100 @@ -2286,7 +2286,11 @@ // Returns a string describing the MIME type that this plugin // handles. -char* +#ifdef LEGACY_XULRUNNERAPI + char* +#else + const char* +#endif NP_GetMIMEDescription () { PLUGIN_DEBUG ("NP_GetMIMEDescription\n");