# HG changeset patch # User "Yann E. MORIN" # Date 1232911600 0 # Node ID 06893705782f65e1a9b8e3b4e69e31042d4950bb # Parent 218f7a0e8d717cd4449df6d45ab2cb6cb41fd562 ./configure: fix the tools pattern recognition - when a variable name was given, with no regexp, the pattern did not correctly extract the variable name /trunk/configure | 11 8 3 0 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff -r 218f7a0e8d71 -r 06893705782f configure --- a/configure Sun Jan 25 17:53:14 2009 +0000 +++ b/configure Sun Jan 25 19:26:40 2009 +0000 @@ -84,7 +84,7 @@ local tool_pattern local field - var_name="$( echo "${1}" |"${sed}" -r -e 's/^((([^=:]+):.+|[^:=]+)=.+|[^:=]+)$/\3/;' )" + var_name="$( echo "${1}" |"${sed}" -r -e 's/^(([^=:]+):.+|[^:=]+=.+|[^:=]+)$/\2/;' )" field="${var_name:+2}" field="${field:-1}" tool_pattern="$( echo "${1}" |cut -d : -f ${field}- |"${sed}" -r -e 's/ *\|\| */\n/g;' )" @@ -139,10 +139,15 @@ regexp= ;; esac - echo " could not find '${tool}' matching regexp '${regexp}'" + printf " could not find '${tool}'" + [ -n "${regexp}" ] && printf " matching regexp '${regexp}'" + echo done echo "Either you are missing entirely the needed tool," echo "or the version you have is tool old." + if [ -n "${var_name}" ]; then + echo "You can give the path to this tool using: --with-${var_name}=PATH" + fi # FORCE can be set in the environment [ -z "${FORCE}" ] && do_error "Bailing out..." else @@ -369,7 +374,7 @@ var_list="grep sed $( printf "${TOOLS_TO_CHECK}" \ - |"${sed}" -r -e 's/^((([^=:]+):.+|[^:=]+)=.+|[^:=]+)$/\3/;' + |"${sed}" -r -e 's/^(([^=:]+):.+|[^:=]+=.+|[^:=]+)$/\2/;' )" var_sed="$( for var_name in ${var_list}; do eval echo 's,@@${var_name}@@,${'"${var_name}"'},g'