Mercurial > hg > release > icedtea-web-1.2
changeset 318:c5faf63fc34e
Made compatible with both versions of xulrunner
author | Jiri Vanek <jvanek@redhat.com> |
---|---|
date | Wed, 21 Dec 2011 09:46:46 +0100 |
parents | 221174bcd4ec |
children | 42c3ed21e228 |
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 Mon Dec 19 15:00:03 2011 -0500 +++ b/ChangeLog Wed Dec 21 09:46:46 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-19 Danesh Dadachanji <ddadacha@redhat.com> Fix for BasicService being used in applet constructors but not
--- a/acinclude.m4 Mon Dec 19 15:00:03 2011 -0500 +++ b/acinclude.m4 Wed Dec 21 09:46:46 2011 +0100 @@ -495,6 +495,26 @@ PKG_CHECK_MODULES([GLIB2_V_216],[glib-2.0 >= 2.16],[],[AC_DEFINE([LEGACY_GLIB])]) ]) +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 Mon Dec 19 15:00:03 2011 -0500 +++ b/configure.ac Wed Dec 21 09:46:46 2011 +0100 @@ -81,6 +81,7 @@ IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef]) IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE IT_CHECK_GLIB_VERSION +IT_CHECK_XULRUNNER_API_VERSION # # Find optional depedencies
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc Mon Dec 19 15:00:03 2011 -0500 +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Wed Dec 21 09:46:46 2011 +0100 @@ -2291,7 +2291,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");