diff options
author | Michael Hutchinson <mhutchinson@novell.com> | 2006-11-29 02:40:25 +0300 |
---|---|---|
committer | Michael Hutchinson <mhutchinson@novell.com> | 2006-11-29 02:40:25 +0300 |
commit | 410bbb48feded7d888bc91c636dd8babe8720987 (patch) | |
tree | 69cc854765d4d6250cca2e161b242be11fcfb4e1 /configure.in | |
parent | 84f9cdf8e09632f9d0900559bb81bb5e9c1f049c (diff) |
2006-11-28 Andrés G. Aragoneses <knocte@gmail.com>
* configure.in: Added a fallback search for MOZILLA_HOME, that is in
sync with the one in monodevelop.in. Reviewed and cleaned up by
Michael Hutchinson <m.j.hutchinson@gmail.com>.
* monodevelop.in: Added a new way to detect MOZILLA_HOME, and improved
the existing ones. Incorporates patch by Mike Morano
<mmorano@mikeandwan.us>.
* Makefile.am: Set MOZILLA_FIVE_HOME for the "make run" command.
svn path=/trunk/monodevelop/; revision=68628
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.in b/configure.in index f07210d4c5..01e86a4570 100644 --- a/configure.in +++ b/configure.in @@ -258,7 +258,31 @@ if test "x$enable_aspnetedit" = "xyes"; then # get zip to create jar/xpi for chrome AC_PATH_PROG(ZIP, zip) else + #We still need to know where Mozilla is for launch scripts, even though we're not using JSCall# + #Check pkg-config first MOZILLA_HOME="`$PKG_CONFIG --variable=libdir mozilla-gtkmozembed`" + if !(test -n "$MOZILLA_HOME"); then + MOZILLA_HOME="`$PKG_CONFIG --variable=libdir firefox-gtkmozembed`" + fi + + #if MOZILLA_HOME is still empty, try to detect without pkg_config + #(NOTE: any changes to this block should be kept in sync with the one in monodevelop.in) + if !(test -n "$MOZILLA_HOME"); then + if test -n "$MOZILLA_FIVE_HOME"; then + MOZILLA_HOME=$MOZILLA_FIVE_HOME + elif grep GRE_PATH /etc/gre.d/*.conf > /dev/null ; then + MOZILLA_HOME=$(grep -h GRE_PATH= /etc/gre.d/*.conf | cut -d '"' -f 2 -d = | head -n 1) + elif [ $(which mozilla 2>/dev/null) ] && grep MOZILLA_FIVE_HOME= "$(which mozilla)" > /dev/null ; then + MOZILLA_HOME=$(grep MOZILLA_FIVE_HOME= $(which mozilla) | cut -d '"' -f 2 | cut -d '=' -f 2 ) + elif [ $(which firefox 2>/dev/null) ] && grep MOZILLA_FIVE_HOME= "$(which firefox)" > /dev/null ; then + MOZILLA_HOME=$(grep MOZILLA_FIVE_HOME= $(which firefox) | cut -d '"' -f 2 | cut -d '=' -f 2 ) + elif [ $(which firefox 2>/dev/null) ] && grep MOZILLA_LIBDIR= "$(which firefox)" > /dev/null ; then + MOZILLA_HOME=$(grep MOZILLA_LIBDIR= $(which firefox) | cut -d '"' -f 2 | cut -d '=' -f 2) + else + AC_MSG_WARN([Cannot detect Mozilla library directory. WelcomePage addin may not be able to function.]) + fi + fi + AC_SUBST(MOZILLA_HOME) fi |