summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-09-11 16:06:35 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-02 15:19:14 +0900
commit7f1ca666424849134990d022266bcd4d6636465f (patch)
treeab8fc9b4afb8410206a149919b4b05fcc3a03e28
parent88c12a29372e3f908190c6af0aa1b2ac6b78fbd1 (diff)
Fallback PKG_CONFIG to the configured pkg-config always
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6482
-rw-r--r--lib/mkmf.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 61ca9e53ac..86ba70ed19 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1866,7 +1866,7 @@ SRC
if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
# if and only if package specific config command is given
elsif ($PKGCONFIG ||=
- (pkgconfig = with_config("pkg-config", ("pkg-config" unless CROSS_COMPILING))) &&
+ (pkgconfig = with_config("pkg-config", RbConfig::CONFIG["PKG_CONFIG"])) &&
find_executable0(pkgconfig) && pkgconfig) and
xsystem([*envs, $PKGCONFIG, "--exists", pkg])
# default to pkg-config command