mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-22 17:42:40 +00:00
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(-)
This commit is contained in:
parent
430ce931e1
commit
7eda231a2d
33
configure
vendored
33
configure
vendored
@ -280,14 +280,24 @@ if [ -n "${grep}" ]; then
|
|||||||
echo "${grep} (cached)"
|
echo "${grep} (cached)"
|
||||||
else
|
else
|
||||||
grep="$( which grep 2>/dev/null )"
|
grep="$( which grep 2>/dev/null )"
|
||||||
[ -z "${grep}" ] && do_error "not found"
|
if [ -z "${grep}" ]; then
|
||||||
|
echo "not found"
|
||||||
|
else
|
||||||
echo "${grep}"
|
echo "${grep}"
|
||||||
fi
|
|
||||||
printf "Checking whether '${grep}' supports -E... "
|
printf "Checking whether '${grep}' supports -E... "
|
||||||
if echo 'foo' |"${grep}" -E 'foo' >/dev/null 2>&1; then
|
if echo 'foo' |"${grep}" -E 'foo' >/dev/null 2>&1; then
|
||||||
echo "yes"
|
echo "yes"
|
||||||
else
|
else
|
||||||
do_error "no"
|
echo "no"
|
||||||
|
grep=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -z "${grep}" ]; then
|
||||||
|
echo "Either you are missing entirely the needed tool,"
|
||||||
|
echo "or the version you have is tool old."
|
||||||
|
echo "You can give the path to this tool using: --with-grep=PATH"
|
||||||
|
do_error "Bailing out..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Checking for 'sed'... "
|
printf "Checking for 'sed'... "
|
||||||
@ -295,17 +305,26 @@ if [ -n "${sed}" ]; then
|
|||||||
echo "${sed} (cached)"
|
echo "${sed} (cached)"
|
||||||
else
|
else
|
||||||
sed="$( which sed 2>/dev/null )"
|
sed="$( which sed 2>/dev/null )"
|
||||||
[ -z "${sed}" ] && do_error "not found"
|
if [ -z "${sed}" ]; then
|
||||||
|
echo "not found"
|
||||||
|
else
|
||||||
echo "${sed}"
|
echo "${sed}"
|
||||||
fi
|
|
||||||
printf "Checking wether '${sed}' supports -i and -e... "
|
printf "Checking wether '${sed}' supports -i and -e... "
|
||||||
touch .ct-ng.sed.test
|
touch .ct-ng.sed.test
|
||||||
if "${sed}" -r -i -e 's/foo/bar/' .ct-ng.sed.test >/dev/null 2>&1; then
|
if "${sed}" -r -i -e 's/foo/bar/' .ct-ng.sed.test >/dev/null 2>&1; then
|
||||||
rm -f .ct-ng.sed.test
|
|
||||||
echo "yes"
|
echo "yes"
|
||||||
else
|
else
|
||||||
|
echo "no"
|
||||||
|
sed=
|
||||||
|
fi
|
||||||
rm -f .ct-ng.sed.test
|
rm -f .ct-ng.sed.test
|
||||||
do_error "no"
|
fi
|
||||||
|
fi
|
||||||
|
if [ -z "${sed}" ]; then
|
||||||
|
echo "Either you are missing entirely the needed tool,"
|
||||||
|
echo "or the version you have is tool old."
|
||||||
|
echo "You can give the path to this tool using: --with-sed=PATH"
|
||||||
|
do_error "Bailing out..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check the existence of absolutely required tools
|
# Check the existence of absolutely required tools
|
||||||
|
Loading…
x
Reference in New Issue
Block a user