aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-02-23 22:17:27 +0800
committerChristian Persch <chpe@src.gnome.org>2006-02-23 22:17:27 +0800
commit2ef2d71665925b3599025077a2336ad35d15f9c6 (patch)
treec2caf42cfebccbfd1416251ca588139e43d5d06c /m4
parent20e55f56780a89c9a4bb00085c6c61e74b13b47f (diff)
downloadgsoc2013-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.
Diffstat (limited to 'm4')
-rw-r--r--m4/gecko.m436
1 files changed, 31 insertions, 5 deletions
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
# ***************************************************************************
# ***************************************************************************