diff options
author | Lluis Sanchez <lluis@novell.com> | 2007-09-10 14:30:40 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@novell.com> | 2007-09-10 14:30:40 +0400 |
commit | bf4043eeeacf8d1d561e523d3d8b13b4cfa3ce22 (patch) | |
tree | 96f99ebe8988495449b844474355dbabf3f51956 | |
parent | aa5a0a2ef030e961f4594f7451da5b4b82bda240 (diff) |
Fixed some mozilla detection issues. Patch by Ian Walker.
svn path=/trunk/monodevelop/; revision=85556
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | configure.in | 25 | ||||
-rwxr-xr-x | monodevelop.in | 27 |
3 files changed, 37 insertions, 19 deletions
@@ -1,3 +1,7 @@ +2007-09-10 Lluis Sanchez Gual <lluis@novell.com> + + + 2007-09-07 Marcos David MarĂn Amador <MarcosMarin@gmail.com> * configure.in: Added a configure option to enable C/C++ project diff --git a/configure.in b/configure.in index 519192c796..b68d94c03b 100644 --- a/configure.in +++ b/configure.in @@ -322,17 +322,24 @@ 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 + mozilla_script=`which mozilla 2> /dev/null` + firefox_script=`which firefox 2> /dev/null` 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 + elif grep GRE_PATH /etc/gre.d/*.conf > /dev/null 2>&1 ; then + MOZILLA_HOME=$(grep -h GRE_PATH= /etc/gre.d/*.conf | cut -d '"' -f 2 -d = | head -n 1) #" + elif test -n "$mozilla_script" && grep "MOZILLA_FIVE_HOME=" $mozilla_script > /dev/null ; then + MOZILLA_HOME=`grep "MOZILLA_FIVE_HOME=" $mozilla_script | cut -d '"' -f 2 | cut -d '=' -f 2` + elif test -n "$firefox_script" ; then + if grep "MOZILLA_FIVE_HOME=" $firefox_script > /dev/null ; then + MOZILLA_HOME=`grep "MOZILLA_FIVE_HOME=" $firefox_script | cut -d '"' -f 2 | cut -d '=' -f 2` + elif grep "MOZILLA_LIBDIR=" $firefox_script > /dev/null ; then + MOZILLA_HOME=`grep "MOZILLA_LIBDIR=" $firefox_script | cut -d '"' -f 2 | cut -d '=' -f 2` + elif grep "moz_libdir=" $firefox_script > /dev/null ; then + MOZILLA_HOME=`grep "moz_libdir=" $firefox_script | cut -d '"' -f 2 | cut -d '=' -f 2` + fi + fi + if test -z "$MOZILLA_HOME"; then if test "x$enable_aspnetedit" = "xyes"; then AC_MSG_ERROR([Cannot detect Mozilla library directory. AspNetEdit addin cannot be built.]) else diff --git a/monodevelop.in b/monodevelop.in index 87e83aec6b..1a908638e9 100755 --- a/monodevelop.in +++ b/monodevelop.in @@ -17,19 +17,26 @@ reWrite() { } #(NOTE: any changes to this block should be kept in sync with the one in configure.in) +mozilla_script=`which mozilla 2> /dev/null` +firefox_script=`which firefox 2> /dev/null` if test -n "$MOZILLA_FIVE_HOME"; then MOZILLA_HOME=$MOZILLA_FIVE_HOME -elif [ -f @MOZILLA_HOME@/chrome/comm.jar ]; then - MOZILLA_HOME=@MOZILLA_HOME@ -elif grep GRE_PATH /etc/gre.d/*.conf > /dev/null ; then +elif grep GRE_PATH /etc/gre.d/*.conf > /dev/null 2>&1 ; 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 +elif test -f @MOZILLA_HOME@/chrome/comm.jar ; then + MOZILLA_HOME=@MOZILLA_HOME@ +elif test -n "$mozilla_script" && grep "MOZILLA_FIVE_HOME=" $mozilla_script > /dev/null ; then + MOZILLA_HOME=`grep "MOZILLA_FIVE_HOME=" $mozilla_script | cut -d '"' -f 2 | cut -d '=' -f 2` +elif test -n "$firefox_script" ; then + if grep "MOZILLA_FIVE_HOME=" $firefox_script > /dev/null ; then + MOZILLA_HOME=`grep "MOZILLA_FIVE_HOME=" $firefox_script | cut -d '"' -f 2 | cut -d '=' -f 2` + elif grep "MOZILLA_LIBDIR=" $firefox_script > /dev/null ; then + MOZILLA_HOME=`grep "MOZILLA_LIBDIR=" $firefox_script | cut -d '"' -f 2 | cut -d '=' -f 2` + elif grep "moz_libdir=" $firefox_script > /dev/null ; then + MOZILLA_HOME=`grep "moz_libdir=" $firefox_script | cut -d '"' -f 2 | cut -d '=' -f 2` + fi +fi +if test -z "$MOZILLA_HOME"; then echo "Cannot find mozilla installation directory. Please set MOZILLA_FIVE_HOME to your mozilla directory" exit 1 fi |