From 613fca01486e47dee9364a2fd86b5f5e77fe23c8 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 7 Dec 2022 22:14:44 +0900 Subject: [PATCH] [Bug #19189] Fallback to the default "pkg-config" --- lib/mkmf.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mkmf.rb b/lib/mkmf.rb index e94733c6357afa..0fbc1cc2e5c80a 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1866,7 +1866,7 @@ def pkg_config(pkg, *options) 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", RbConfig::CONFIG["PKG_CONFIG"])) && + (pkgconfig = with_config("pkg-config") {config_string("PKG_CONFIG") || "pkg-config"}) && find_executable0(pkgconfig) && pkgconfig) and xsystem([*envs, $PKGCONFIG, "--exists", pkg]) # default to pkg-config command