1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fallback PKG_CONFIG to the configured pkg-config always

This commit is contained in:
Nobuyoshi Nakada 2022-09-11 16:06:35 +09:00
parent 88c12a2937
commit 7f1ca66642
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6
Notes: git 2022-10-02 17:29:48 +09:00

View file

@ -1866,7 +1866,7 @@ SRC
if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig) if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
# if and only if package specific config command is given # if and only if package specific config command is given
elsif ($PKGCONFIG ||= 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 find_executable0(pkgconfig) && pkgconfig) and
xsystem([*envs, $PKGCONFIG, "--exists", pkg]) xsystem([*envs, $PKGCONFIG, "--exists", pkg])
# default to pkg-config command # default to pkg-config command