OSDN Git Service

configure: Replace which(1) with "has"
authorFam Zheng <famz@redhat.com>
Thu, 4 Dec 2014 06:18:16 +0000 (14:18 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 10 Dec 2014 08:35:36 +0000 (11:35 +0300)
Using "has" is more slick because which(1) is not always there.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Amos Kong <akong@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
configure

index 47048f0..cae588c 100755 (executable)
--- a/configure
+++ b/configure
@@ -2727,7 +2727,7 @@ fi
 if test "$modules" = yes; then
     shacmd_probe="sha1sum sha1 shasum"
     for c in $shacmd_probe; do
-        if which $c >/dev/null 2>&1; then
+        if has $c; then
             shacmd="$c"
             break
         fi