Checking for grep and sed has been rationalised, and now emit the same messages as for the other tools.
/trunk/configure | 53 36 17 0 ++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 36 insertions(+), 17 deletions(-)
1.1 --- a/configure Sun Feb 01 17:11:46 2009 +0000
1.2 +++ b/configure Sun Feb 01 18:40:16 2009 +0000
1.3 @@ -280,14 +280,24 @@
1.4 echo "${grep} (cached)"
1.5 else
1.6 grep="$( which grep 2>/dev/null )"
1.7 - [ -z "${grep}" ] && do_error "not found"
1.8 - echo "${grep}"
1.9 + if [ -z "${grep}" ]; then
1.10 + echo "not found"
1.11 + else
1.12 + echo "${grep}"
1.13 + printf "Checking whether '${grep}' supports -E... "
1.14 + if echo 'foo' |"${grep}" -E 'foo' >/dev/null 2>&1; then
1.15 + echo "yes"
1.16 + else
1.17 + echo "no"
1.18 + grep=
1.19 + fi
1.20 + fi
1.21 fi
1.22 -printf "Checking whether '${grep}' supports -E... "
1.23 -if echo 'foo' |"${grep}" -E 'foo' >/dev/null 2>&1; then
1.24 - echo "yes"
1.25 -else
1.26 - do_error "no"
1.27 +if [ -z "${grep}" ]; then
1.28 + echo "Either you are missing entirely the needed tool,"
1.29 + echo "or the version you have is tool old."
1.30 + echo "You can give the path to this tool using: --with-grep=PATH"
1.31 + do_error "Bailing out..."
1.32 fi
1.33
1.34 printf "Checking for 'sed'... "
1.35 @@ -295,17 +305,26 @@
1.36 echo "${sed} (cached)"
1.37 else
1.38 sed="$( which sed 2>/dev/null )"
1.39 - [ -z "${sed}" ] && do_error "not found"
1.40 - echo "${sed}"
1.41 + if [ -z "${sed}" ]; then
1.42 + echo "not found"
1.43 + else
1.44 + echo "${sed}"
1.45 + printf "Checking wether '${sed}' supports -i and -e... "
1.46 + touch .ct-ng.sed.test
1.47 + if "${sed}" -r -i -e 's/foo/bar/' .ct-ng.sed.test >/dev/null 2>&1; then
1.48 + echo "yes"
1.49 + else
1.50 + echo "no"
1.51 + sed=
1.52 + fi
1.53 + rm -f .ct-ng.sed.test
1.54 + fi
1.55 fi
1.56 -printf "Checking wether '${sed}' supports -i and -e... "
1.57 -touch .ct-ng.sed.test
1.58 -if "${sed}" -r -i -e 's/foo/bar/' .ct-ng.sed.test >/dev/null 2>&1; then
1.59 - rm -f .ct-ng.sed.test
1.60 - echo "yes"
1.61 -else
1.62 - rm -f .ct-ng.sed.test
1.63 - do_error "no"
1.64 +if [ -z "${sed}" ]; then
1.65 + echo "Either you are missing entirely the needed tool,"
1.66 + echo "or the version you have is tool old."
1.67 + echo "You can give the path to this tool using: --with-sed=PATH"
1.68 + do_error "Bailing out..."
1.69 fi
1.70
1.71 # Check the existence of absolutely required tools