From bf4043eeeacf8d1d561e523d3d8b13b4cfa3ce22 Mon Sep 17 00:00:00 2001 From: Lluis Sanchez Date: Mon, 10 Sep 2007 10:30:40 +0000 Subject: Fixed some mozilla detection issues. Patch by Ian Walker. svn path=/trunk/monodevelop/; revision=85556 --- configure.in | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'configure.in') 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 -- cgit v1.2.3