configure: dispose of which.test

just use 'which' and be done with it. the script was rather arcane, and
worked around deficiencies of cygwin (no longer relevant) and solaris
(assumed to be somewhat sane meanwhile).

Change-Id: I2e11ea3c87ac06a85604ac8d58d8fee95eae2e15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Oswald Buddenhagen 2017-07-31 12:53:50 +02:00 committed by Simon Hausmann
parent acf75d7337
commit 92ff8a2500
2 changed files with 1 additions and 42 deletions

View File

@ -1,39 +0,0 @@
#!/bin/sh
HOME=/dev/null
export HOME
unset which
WHICH=`which which 2>/dev/null`
if echo $WHICH | grep 'shell built-in command' >/dev/null 2>&1; then
WHICH=which
elif [ -z "$WHICH" ]; then
if which which >/dev/null 2>&1; then
WHICH=which
else
for a in /usr/ucb /usr/bin /bin /usr/local/bin; do
if [ -x $a/which ]; then
WHICH=$a/which
break;
fi
done
fi
fi
if [ -z "$WHICH" ]; then
IFS=:
for a in $PATH; do
if [ -x $a/$1 ]; then
echo "$a/$1"
exit 0
fi
done
else
a=`"$WHICH" "$1" 2>/dev/null`
if [ ! -z "$a" -a -x "$a" ]; then
echo "$a"
exit 0
fi
fi
exit 1

4
configure vendored
View File

@ -40,9 +40,7 @@ relpath=`(cd "$relpath"; /bin/pwd)`
# the current directory is the "build tree" or "object tree"
outpath=`/bin/pwd`
# where to find which..
unixtests="$relpath/config.tests/unix"
WHICH="$unixtests/which.test"
WHICH="which"
PERL=`$WHICH perl 2>/dev/null`