From 79d8a3159f60d32396c8281fe438e86ab97e3daa Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 5 Aug 2025 21:34:03 +0900 Subject: [PATCH] Check if the found pkg-config is usable actually --- test/mkmf/test_pkg_config.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/mkmf/test_pkg_config.rb b/test/mkmf/test_pkg_config.rb index d0a2dc130a..abeaf548f8 100644 --- a/test/mkmf/test_pkg_config.rb +++ b/test/mkmf/test_pkg_config.rb @@ -3,7 +3,9 @@ require_relative 'base' require 'shellwords' class TestMkmfPkgConfig < TestMkmf - PKG_CONFIG = config_string("PKG_CONFIG") {|path| find_executable0(path)} + PKG_CONFIG = config_string("PKG_CONFIG") do |path| + find_executable0(path, "--version") {$?.success?} + end def setup super