aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-08-13 22:25:12 +0800
committerChristian Persch <chpe@src.gnome.org>2005-08-13 22:25:12 +0800
commita8bb2fb64f68a142301f41354eff6132e389d9d7 (patch)
tree6c35f374508a05ca41661d93445ae5ddb112e7e8 /configure.ac
parent2837d6736fc3af78003dd23aee211053522274b7 (diff)
downloadgsoc2013-epiphany-a8bb2fb64f68a142301f41354eff6132e389d9d7.tar
gsoc2013-epiphany-a8bb2fb64f68a142301f41354eff6132e389d9d7.tar.gz
gsoc2013-epiphany-a8bb2fb64f68a142301f41354eff6132e389d9d7.tar.bz2
gsoc2013-epiphany-a8bb2fb64f68a142301f41354eff6132e389d9d7.tar.lz
gsoc2013-epiphany-a8bb2fb64f68a142301f41354eff6132e389d9d7.tar.xz
gsoc2013-epiphany-a8bb2fb64f68a142301f41354eff6132e389d9d7.tar.zst
gsoc2013-epiphany-a8bb2fb64f68a142301f41354eff6132e389d9d7.zip
Better gecko version check.
2005-08-13 Christian Persch <chpe@cvs.gnome.org> * configure.ac: Better gecko version check.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 21 insertions, 11 deletions
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