aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-02-23 08:57:13 +0800
committerChristian Persch <chpe@src.gnome.org>2006-02-23 08:57:13 +0800
commitfc940955d547f283674dd622905a80487258be5c (patch)
tree7254d79fd46e10c107cb80dd65a5a3e9b092a127 /configure.ac
parentc1e4873c4e1452b42afc5b2be611d1636979d457 (diff)
downloadgsoc2013-epiphany-fc940955d547f283674dd622905a80487258be5c.tar
gsoc2013-epiphany-fc940955d547f283674dd622905a80487258be5c.tar.gz
gsoc2013-epiphany-fc940955d547f283674dd622905a80487258be5c.tar.bz2
gsoc2013-epiphany-fc940955d547f283674dd622905a80487258be5c.tar.lz
gsoc2013-epiphany-fc940955d547f283674dd622905a80487258be5c.tar.xz
gsoc2013-epiphany-fc940955d547f283674dd622905a80487258be5c.tar.zst
gsoc2013-epiphany-fc940955d547f283674dd622905a80487258be5c.zip
Refactored. Added GECKO_XPCOM_PROGRAM modelled after AC_LANG_PROGRAM but
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. * configure.ac: Add a check for the gecko typeaheadfind extension. Bug #329118.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac42
1 files changed, 39 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index bb17a488e..7ded1d15d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -269,10 +269,46 @@ GECKO_COMPILE_IFELSE([fastfind],
[[nsITypeAheadFind *p;
p->SetDocShell(nsnull);]]
)],
- [AC_DEFINE([HAVE_TYPEAHEADFIND],[1],[Define if we have tookit's typeaheadfind]) result=yes],
- [result=no])
+ [AC_DEFINE([HAVE_TYPEAHEADFIND],[1],[Define if we have tookit's typeaheadfind]) have_typeaheadfind=yes],
+ [have_typeaheadfind=no])
-AC_MSG_RESULT([$result])
+AC_MSG_RESULT([$have_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])
+
+GECKO_RUN_IFELSE([],
+[GECKO_XPCOM_PROGRAM(
+[[#include <nsIComponentRegistrar.h>]],
+[[
+nsCOMPtr<nsIComponentRegistrar> registrar;
+rv = NS_GetComponentRegistrar (getter_AddRefs (registrar));
+if (NS_FAILED (rv)) break;
+
+nsCID *classID = nsnull;
+rv = registrar->ContractIDToCID ("@mozilla.org/typeaheadfind;1", &classID);
+if (NS_FAILED (rv) || !classID) break;
+
+nsCID badClassID = { 0x46590685, 0xbc00, 0x4aac,
+ { 0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4 } };
+
+retval = ! classID->Equals(badClassID);
+]]
+)],
+[have_typeaheadfind_ext=no],
+[have_typeaheadfind_ext=yes],
+[have_typeaheadfind_ext=maybe])
+
+AC_MSG_RESULT([$have_typeaheadfind_ext])
+
+if test "$have_typeaheadfind_ext" = "yes"; then
+ AC_MSG_ERROR([You must not compile gecko with the "typeaheadfind" extension enabled!])
+fi
+
+fi # have_typeaheadfind = yes
# Make sure we don't accidentally build without PSM support