diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2006-02-23 22:17:27 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2006-02-23 22:17:27 +0800 |
commit | 2ef2d71665925b3599025077a2336ad35d15f9c6 (patch) | |
tree | c2caf42cfebccbfd1416251ca588139e43d5d06c | |
parent | 20e55f56780a89c9a4bb00085c6c61e74b13b47f (diff) | |
download | gsoc2013-epiphany-2ef2d71665925b3599025077a2336ad35d15f9c6.tar gsoc2013-epiphany-2ef2d71665925b3599025077a2336ad35d15f9c6.tar.gz gsoc2013-epiphany-2ef2d71665925b3599025077a2336ad35d15f9c6.tar.bz2 gsoc2013-epiphany-2ef2d71665925b3599025077a2336ad35d15f9c6.tar.lz gsoc2013-epiphany-2ef2d71665925b3599025077a2336ad35d15f9c6.tar.xz gsoc2013-epiphany-2ef2d71665925b3599025077a2336ad35d15f9c6.tar.zst gsoc2013-epiphany-2ef2d71665925b3599025077a2336ad35d15f9c6.zip |
Added GECKO_CHECK_CONTRACTIDS. Fix variable name quoting in
2006-02-23 Christian Persch <chpe@cvs.gnome.org>
* m4/gecko.m4:
Added GECKO_CHECK_CONTRACTIDS. Fix variable name quoting in
GECKO_GECKO_CONTRACTID.
* configure.ac:
Check with GECKO_CHECK_CONTRACTIDS.
Remove redundant check for typeaheadfind.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | configure.ac | 49 | ||||
-rw-r--r-- | m4/gecko.m4 | 36 |
3 files changed, 59 insertions, 38 deletions
@@ -2,6 +2,18 @@ * m4/gecko.m4: + Added GECKO_CHECK_CONTRACTIDS. Fix variable name quoting in + GECKO_GECKO_CONTRACTID. + + * configure.ac: + + Check with GECKO_CHECK_CONTRACTIDS. + Remove redundant check for typeaheadfind. + +2006-02-23 Christian Persch <chpe@cvs.gnome.org> + + * m4/gecko.m4: + Refactored. Added GECKO_XPCOM_PROGRAM modelled after AC_LANG_PROGRAM but which produces a program which uses XPCOM; and made GECKO_CHECK_CONTRACTID use this. diff --git a/configure.ac b/configure.ac index 7ded1d15d..99c636f50 100644 --- a/configure.ac +++ b/configure.ac @@ -261,24 +261,13 @@ AC_MSG_RESULT([$have_psm]) # This is only present on toolkit -AC_MSG_CHECKING([for toolkit's nsITypeAheadFind]) +if test "$gecko_cv_gecko_flavour" = "toolkit"; then -GECKO_COMPILE_IFELSE([fastfind], - [AC_LANG_PROGRAM( - [[#include <nsITypeAheadFind.h>]], - [[nsITypeAheadFind *p; - p->SetDocShell(nsnull);]] - )], - [AC_DEFINE([HAVE_TYPEAHEADFIND],[1],[Define if we have tookit's typeaheadfind]) have_typeaheadfind=yes], - [have_typeaheadfind=no]) - -AC_MSG_RESULT([$have_typeaheadfind]) +AC_DEFINE([HAVE_TYPEAHEADFIND],[1],[Define if we have tookit's typeaheadfind]) # Make sure we DON'T have the typeaheadfind extension -if test "$have_typeaheadfind" = "yes"; then - -AC_MSG_CHECKING([whether the typeaheadfind extension was enabled]) +AC_MSG_CHECKING([whether typeaheadfind is broken]) GECKO_RUN_IFELSE([], [GECKO_XPCOM_PROGRAM( @@ -295,20 +284,20 @@ if (NS_FAILED (rv) || !classID) break; nsCID badClassID = { 0x46590685, 0xbc00, 0x4aac, { 0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4 } }; -retval = ! classID->Equals(badClassID); +retval = ! classID->Equals (badClassID); ]] )], -[have_typeaheadfind_ext=no], -[have_typeaheadfind_ext=yes], -[have_typeaheadfind_ext=maybe]) +[have_broken_typeaheadfind=no], +[have_broken_typeaheadfind=yes], +[have_broken_typeaheadfind=maybe]) -AC_MSG_RESULT([$have_typeaheadfind_ext]) +AC_MSG_RESULT([$have_broken_typeaheadfind]) -if test "$have_typeaheadfind_ext" = "yes"; then - AC_MSG_ERROR([You must not compile gecko with the "typeaheadfind" extension enabled!]) +if test "$have_broken_typeaheadfind" = "yes"; then + AC_MSG_ERROR([You must not compile $gecko_cv_gecko with the "typeaheadfind" extension enabled!]) fi -fi # have_typeaheadfind = yes +fi # gecko_cv_gecko_flavour = toolkit # Make sure we don't accidentally build without PSM support @@ -361,22 +350,16 @@ GECKO_CHECK_HEADERS([windowwatcher],[nsINonBlockingAlertService.h]) # Check for some contractIDs that we need but are provided by extensions # which may or may not have been built. +REQUIRED_CONTRACTS="@mozilla.org/permissionmanager;1 @mozilla.org/PopupWindowManager;1 @mozilla.org/cookie/permission;1" REQUIRED_EXTENSIONS="cookie" + if test "$gecko_cv_gecko_version_major" = 1 -a "$gecko_cv_gecko_version_minor" -ge "8"; then + REQUIRED_CONTRACTS="$REQUIRED_CONTRACTS @mozilla.org/permissions/contentblocker;1" REQUIRED_EXTENSIONS="$REQUIRED_EXTENSIONS,permissions" fi -GECKO_CHECK_CONTRACTID([@mozilla.org/permissionmanager;1], - [],[AC_MSG_ERROR([Gecko needs to be compiled with at least --enable-extensions=default,$REQUIRED_EXTENSIONS])]) -GECKO_CHECK_CONTRACTID([@mozilla.org/PopupWindowManager;1], - [],[AC_MSG_ERROR([Gecko needs to be compiled with at least --enable-extensions=default,$REQUIRED_EXTENSIONS])]) -GECKO_CHECK_CONTRACTID([@mozilla.org/cookie/permission;1], - [],[AC_MSG_ERROR([Gecko needs to be compiled with at least --enable-extensions=default,$REQUIRED_EXTENSIONS])]) - -if test "$gecko_cv_gecko_version_major" = "1" -a "$gecko_cv_gecko_version_minor" -ge "8"; then - GECKO_CHECK_CONTRACTID([@mozilla.org/permissions/contentblocker;1], - [],[AC_MSG_ERROR([Gecko needs to be compiled with at least --enable-extensions=default,$REQUIRED_EXTENSIONS])]) -fi +GECKO_CHECK_CONTRACTIDS([$REQUIRED_CONTRACTS], + [],[AC_MSG_ERROR([$gecko_cv_gecko needs to be compiled with at least --enable-extensions=default,$REQUIRED_EXTENSIONS])]) # Needed since 1.8b2 # Define this down here so it doesn't affect the API checks above diff --git a/m4/gecko.m4 b/m4/gecko.m4 index 80125084e..cf5ef77f3 100644 --- a/m4/gecko.m4 +++ b/m4/gecko.m4 @@ -365,9 +365,9 @@ AC_DEFUN([GECKO_RUN_IFELSE],[_GECKO_DISPATCH([AC_RUN_IFELSE],$@)]) # *************************************************************************** # *************************************************************************** -# GECKO_PROGRAM([PROLOGUE], [BODY]) +# GECKO_XPCOMPROGRAM([PROLOGUE], [BODY]) # -# Produce a template program which starts XPCOM up and shuts it down after +# Produce a template C++ program which starts XPCOM up and shuts it down after # the BODY part has run. In BODY, the the following variables are predeclared: # # nsresult rv @@ -425,7 +425,7 @@ m4_shiftn(1,$@) NS_ShutdownXPCOM (nsnull); exit (retval ? EXIT_SUCCESS : EXIT_FAILURE); ]]) -]) # GECKO_PROGRAM +]) # GECKO_XPCOM_PROGRAM # *************************************************************************** # *************************************************************************** @@ -441,7 +441,7 @@ AC_DEFUN([GECKO_CHECK_CONTRACTID], AS_VAR_PUSHDEF([gecko_cv_have_CID],[gecko_cv_have_$1]) AC_CACHE_CHECK([for the $1 XPCOM component], -[gecko_cv_have_CID], +gecko_cv_have_CID, [ AS_VAR_SET(gecko_cv_have_CID,[no]) @@ -474,7 +474,33 @@ fi AS_VAR_POPDEF([gecko_cv_have_CID]) -]) +]) # GECKO_CHECK_CONTRACTID + +# GECKO_CHECK_CONTRACTIDS(CONTRACTID, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Checks wheter CONTRACTIDs are registered contract IDs. +# If ACTION-IF-NOT-FOUND is given, it is executed when one of the contract IDs +# is not found and the missing contract ID is in the |as_contractid| variable. + +AC_DEFUN([GECKO_CHECK_CONTRACTIDS], +[AC_REQUIRE([GECKO_INIT])dnl + +result=yes +as_contractid= +for as_contractid in $1 +do + GECKO_CHECK_CONTRACTID([$as_contractid],[],[result=no; break;]) +done + +if test "$result" = "yes"; then + ifelse([$2],,[:],[$2]) +else + ifelse([$3],,[AC_MSG_FAILURE([dnl +Contract ID "$as_contractid" is not registered, but $PACKAGE_NAME depends on it.])], + [$3]) +fi + +]) # GECKO_CHECK_CONTRACTIDS # *************************************************************************** # *************************************************************************** |