summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-19 23:52:22 +0100
committerSam James <sam@gentoo.org>2022-06-19 23:52:46 +0100
commit91bf24dd3c91f826377548b7e164b49cfed56f9a (patch)
tree644329800a9fa39499bf75155de9567d513a0adf
parentd224993d423bcd0e88d8eacc0464bc3a66972e95 (diff)
downloadpciutils-91bf24dd3c91f826377548b7e164b49cfed56f9a.tar.gz
lib/configure: drop usage of which
'which' is not required by POSIX and is an external command which may not be available, and 'command -v' does the job just fine. Debian and Gentoo at least are both making efforts to drop which from their base system package list. Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-xlib/configure4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/configure b/lib/configure
index 45a416a..1c3343a 100755
--- a/lib/configure
+++ b/lib/configure
@@ -238,7 +238,7 @@ if [ "$sys" = linux ] ; then
PKG_CONFIG=pkg-config
fi
if [ "$LIBKMOD" != no ] ; then
- if ! which $PKG_CONFIG >/dev/null ; then
+ if ! command -v $PKG_CONFIG >/dev/null ; then
echo_n "($PKG_CONFIG not found) "
elif $PKG_CONFIG libkmod ; then
LIBKMOD_DETECTED=1
@@ -268,7 +268,7 @@ if [ "$sys" = linux ] ; then
if [ "$HWDB" = yes -o "$HWDB" = no ] ; then
echo "$HWDB (set manually)"
else
- if `which pkg-config >/dev/null && pkg-config --atleast-version=196 libudev` ; then
+ if `command -v pkg-config >/dev/null && pkg-config --atleast-version=196 libudev` ; then
HWDB=yes
else
HWDB=no