aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-11-10 06:06:43 +0800
committerChristian Persch <chpe@src.gnome.org>2005-11-10 06:06:43 +0800
commit644d76ada5c90a2b070c5a31be3fe6a95156fe5d (patch)
tree962d24a7d8148973bb15ad5c27c51e7562e575b4
parent8353ce327a0ca559a8ba2fac90d822e328f90b5b (diff)
downloadgsoc2013-epiphany-644d76ada5c90a2b070c5a31be3fe6a95156fe5d.tar.gz
gsoc2013-epiphany-644d76ada5c90a2b070c5a31be3fe6a95156fe5d.tar.zst
gsoc2013-epiphany-644d76ada5c90a2b070c5a31be3fe6a95156fe5d.zip
Add check for contract IDs which we need but are only provided by
2005-11-09 Christian Persch <chpe@cvs.gnome.org> * configure.ac: * m4/gecko.m4: Add check for contract IDs which we need but are only provided by extensions which may or may not have been built into gecko. We cannot check for the headers here since they are always present.
-rw-r--r--ChangeLog9
-rw-r--r--configure.ac6
-rw-r--r--m4/gecko.m422
3 files changed, 27 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 4ddce6bf9..596349932 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2005-11-09 Christian Persch <chpe@cvs.gnome.org>
+ * configure.ac:
+ * m4/gecko.m4:
+
+ Add check for contract IDs which we need but are only provided
+ by extensions which may or may not have been built into gecko.
+ We cannot check for the headers here since they are always present.
+
+2005-11-09 Christian Persch <chpe@cvs.gnome.org>
+
* data/glade/epiphany.glade:
Because the Dwnloads window is a GtkDiaog for technical reasons,
diff --git a/configure.ac b/configure.ac
index c34aa0a6a..85b5b748a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -405,6 +405,12 @@ if test "x$enable_filepicker" = "xyes"; then
AC_DEFINE([ENABLE_FILEPICKER],[1],[Define to enable the native filepicker])
fi
+dnl Check for some contractIDs that we need but are provided by extensions
+dnl which may or may not have been built.
+
+GECKO_CHECK_CONTRACTID([PermissionsManager],[@mozilla.org/permissionmanager;1])
+GECKO_CHECK_CONTRACTID([CookiePermission],[@mozilla.org/cookie/permission;1])
+
dnl ***************
dnl Multimedia keys
dnl ***************
diff --git a/m4/gecko.m4 b/m4/gecko.m4
index 2c656d0a7..29542fbd3 100644
--- a/m4/gecko.m4
+++ b/m4/gecko.m4
@@ -177,15 +177,15 @@ dnl ***************************************************************************
dnl ***************************************************************************
dnl ***************************************************************************
-dnl GECKO_CHECK_CONTRACTID_REGISTERED(IDENTIFIER, CONTRACTID, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl GECKO_CHECK_CONTRACTID(IDENTIFIER, CONTRACTID, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl
-AC_DEFUN([GECKO_CHECK_CONTRACTID_REGISTERED],
+AC_DEFUN([GECKO_CHECK_CONTRACTID],
[AC_REQUIRE([GECKO_INIT])dnl
AC_CACHE_CHECK([for the $2 XPCOM component],
-[gecko_cv_xpcom_service_[]$1],
+[gecko_cv_xpcom_contractid_[]$1],
[
-gecko_cv_xpcom_service_[]$1[]=no
+gecko_cv_xpcom_contractid_[]$1[]=no
AC_LANG_PUSH([C++])
@@ -210,7 +210,7 @@ if (NS_FAILED (rv) || !serviceManager) {
}
nsCOMPtr<nsISupports> service;
-rv = serviceManager->GetServiceByContractID ($2, NS_GET_IID (nsISupports), getter_AddRefs (service));
+rv = serviceManager->GetServiceByContractID ("$2", NS_GET_IID (nsISupports), getter_AddRefs (service));
if (NS_FAILED (rv) || !service) {
NS_ShutdownXPCOM (nsnull);
exit (EXIT_FAILURE);
@@ -220,9 +220,9 @@ NS_ShutdownXPCOM (nsnull);
exit (EXIT_SUCCESS);
])
],
-[gecko_cv_xpcom_service_[]$1[]=yes],
-[gecko_cv_xpcom_service_[]$1[]=no],
-[gecko_cv_xpcom_service_[]$1[]="no (cross-compiling)"])
+[gecko_cv_xpcom_contractid_[]$1[]=yes],
+[gecko_cv_xpcom_contractid_[]$1[]=no],
+[gecko_cv_xpcom_contractid_[]$1[]="no (cross-compiling)"])
CPPFLAGS="$_SAVE_CPPFLAGS"
CXXFLAGS="$_SAVE_CXXFLAGS"
@@ -232,10 +232,12 @@ AC_LANG_POP([C++])
])
-if test "$gecko_cv_xpcom_service_[]$1" = "yes"; then
+if test "$gecko_cv_xpcom_contractid_[]$1" = "yes"; then
ifelse([$3],,[:],[$3])
else
- ifelse([$4],,[:],[$4])
+ ifelse([$4],,[AC_MSG_FAILURE([dnl
+Contract ID "$2" is not registered, but this program depends on it.])],
+ [$4])
fi
])