aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--configure.ac32
2 files changed, 27 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 82e298f6a..5cf35bdab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
2005-08-13 Christian Persch <chpe@cvs.gnome.org>
+
+ * configure.ac:
+
+ Better gecko version check.
+
+2005-08-13 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/MozDownload.cpp:
diff --git a/configure.ac b/configure.ac
index a06605fb5..881414b13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -305,22 +305,32 @@ dnl and not the Gecko version
AC_MSG_CHECKING([[for gecko version]])
-AC_PREPROC_IFELSE(
- [AC_LANG_SOURCE(
- [[#include <mozilla-config.h>
- #define _DECL_VERSION(major,minor) ((major << 8) + minor)
- #if (_DECL_VERSION(MOZILLA_VERSION_MAJOR,MOZILLA_VERSION_MINOR) < _DECL_VERSION(1,8))
- #error No
- #endif]]
- )],
- [have_gecko_1_8=yes gecko_version="1.8"],
- [have_gecko_1_8=no gecko_version="1.7"])
+gecko_version_major=`cat $MOZILLA_INCLUDE_ROOT/mozilla-config.h | grep MOZILLA_VERSION_MAJOR | awk '{ print $[3]; }'`
+gecko_version_minor=`cat $MOZILLA_INCLUDE_ROOT/mozilla-config.h | grep MOZILLA_VERSION_MINOR | awk '{ print $[3]; }'`
-AC_MSG_RESULT([$gecko_version])
+dnl These variables are only available since gecko 1.8
+if test -z "$gecko_version_major" -o -z "$gecko_version_minor"; then
+ gecko_version_major=1
+ gecko_version_minor=7
+fi
+
+AC_MSG_RESULT([$gecko_version_major.$gecko_version_minor])
+
+if test "$gecko_version_major" = "1" -a "$gecko_version_minor" = "9"; then
+ AC_MSG_ERROR([Gecko 1.9 is not supported yet])
+ have_gecko_1_8=yes
+elif test "$gecko_version_major" = "1" -a "$gecko_version_minor" = "8"; then
+ have_gecko_1_8=yes
+elif test "$gecko_version_major" = "1" -a "$gecko_version_minor" = "7"; then
+ have_gecko_1_8=no
+else
+ AC_MSG_ERROR([Unsupported Gecko version $gecko_version_major.$gecko_version_minor])
+fi
if test "x$have_gecko_1_8" = "xyes"; then
AC_DEFINE([HAVE_GECKO_1_8],[1],[Define if we have gecko 1.8])
fi
+
AM_CONDITIONAL([HAVE_GECKO_1_8],[test "x$have_gecko_1_8" = "xyes"])
dnl Changed from PRUnichar* to nsAString& in 1.8a1 and on aviary branch