btrfs-progs: build: Use PKG_CONFIG instead of pkg-config

Hard-coding the pkg-config executable might result in build errors
on system and cross environments that have prefixed toolchains. The
PKG_CONFIG variable already holds the proper one and is already used
in a few other places.

Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Signed-off-by: Heiko Becker <heirecka@exherbo.org>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Heiko Becker 2021-03-09 22:24:40 +01:00 committed by David Sterba
parent 542718c8d0
commit 098e08b269
1 changed files with 3 additions and 3 deletions

View File

@ -223,17 +223,17 @@ elif test "$with_crypto" = "libgcrypt"; then
cryptoprovider="libgcrypt"
PKG_CHECK_MODULES(GCRYPT, [libgcrypt >= 1.8.0])
AC_DEFINE([CRYPTOPROVIDER_LIBGCRYPT],[1],[Use libcrypt])
cryptoproviderversion=`pkg-config libgcrypt --version`
cryptoproviderversion=`${PKG_CONFIG} libgcrypt --version`
elif test "$with_crypto" = "libsodium"; then
cryptoprovider="libsodium"
PKG_CHECK_MODULES(SODIUM, [libsodium >= 1.0.4])
AC_DEFINE([CRYPTOPROVIDER_LIBSODIUM],[1],[Use libsodium])
cryptoproviderversion=`pkg-config libsodium --version`
cryptoproviderversion=`${PKG_CONFIG} libsodium --version`
elif test "$with_crypto" = "libkcapi"; then
cryptoprovider="libkcapi"
PKG_CHECK_MODULES(KCAPI, [libkcapi >= 1.0.0])
AC_DEFINE([CRYPTOPROVIDER_LIBKCAPI],[1],[Use libkcapi])
cryptoproviderversion=`pkg-config libkcapi --version`
cryptoproviderversion=`${PKG_CONFIG} libkcapi --version`
else
AC_MSG_ERROR([unrecognized crypto provider: $with_crypto])
fi