aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac50
1 files changed, 27 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index 49f5590ef..15e377890 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
dnl Copyright (C) 2000-2004 Marco Pesenti Gritti
-dnl Copyright (C) 2003, 2004 Christian Persch
+dnl Copyright (C) 2003, 2004, 2005 Christian Persch
dnl
dnl This program is free software; you can redistribute it and/or modify it
dnl under the terms of the GNU General Public License as published by the
@@ -162,37 +162,41 @@ dnl *******
AC_MSG_CHECKING([which mozilla to use])
-MOZILLA=
AC_ARG_WITH([mozilla],
AS_HELP_STRING([--with-mozilla@<:@=mozilla|firefox|thunderbird@:>@],
- [Whether to use mozilla, firefox or thunderbird gtkmozembed (default: mozilla)]),
- [MOZILLA="$withval"])
-
-dnl try to autodetect: if mozilla exists, use it, else try firefox, then thunderbird
-if test "x$MOZILLA" = "x"; then
- if $PKG_CONFIG --exists firefox-gtkmozembed; then
- MOZILLA=firefox
- elif $PKG_CONFIG --exists mozilla-gtkmozembed; then
- MOZILLA=mozilla
- elif $PKG_CONFIG --exists thunderbird-gtkmozembed; then
- MOZILLA=thunderbird
- else
- AC_MSG_ERROR([no mozilla installation found])
- fi
-elif test "x$with_mozilla" != "xmozilla" -a "x$with_mozilla" != "xfirefox" -a "x$with_mozilla" != "xthunderbird"; then
- AC_MSG_ERROR([unknown mozilla name ($MOZILLA)])
+ [Which gecko engine to use (default: autodetect)]))
+
+GECKOS="firefox mozilla-firefox seamonkey mozilla thunderbird mozilla-thunderbird"
+gecko=$with_mozilla
+
+if test "x$gecko" = "x"; then
+ dnl Autodetect gecko
+ for g in $GECKOS; do
+ if $PKG_CONFIG --exists $g-xpcom; then
+ gecko=$g
+ break;
+ fi
+ done
fi
-AC_SUBST(MOZILLA)
+if test "x$gecko" = "x"; then
+ AC_MSG_ERROR([No gecko found])
+elif ! ( echo "$GECKOS" | egrep "(^| )$gecko(\$| )" > /dev/null); then
+ AC_MSG_ERROR([Unknown gecko "$gecko" specified])
+fi
-AC_MSG_RESULT([$MOZILLA])
+AC_MSG_RESULT([$gecko])
-case "$MOZILLA" in
+case "$gecko" in
mozilla) min_version=1.7.5 flavour=mozilla ;;
-firefox) min_version=1.0 flavour=toolkit ;;
-thunderbird) min_version=1.0 flavour=toolkit ;;
+seamonkey) min_version=1.0 flavour=mozilla ;;
+*firefox) min_version=1.0 flavour=toolkit ;;
+*thunderbird) min_version=1.0 flavour=toolkit ;;
esac
+MOZILLA=$gecko
+AC_SUBST([MOZILLA])
+
MOZILLA_FLAVOUR=$flavour
AC_SUBST(MOZILLA_FLAVOUR)