From 78f4a5703924ce15c75aa0a826426e1959382ae1 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Wed, 6 Apr 2022 09:51:05 -0400 Subject: [PATCH] ext: systems missing libiconv will see a relevant error message instead of a syntax error from extconf.rb Fixes #2487 --- ext/nokogiri/extconf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/nokogiri/extconf.rb b/ext/nokogiri/extconf.rb index c21638f873f..d91a833d14f 100644 --- a/ext/nokogiri/extconf.rb +++ b/ext/nokogiri/extconf.rb @@ -400,8 +400,8 @@ def iconv_configure_flags return ["--with-iconv=yes"] end - config = preserving_globals { have_package_configuration("libiconv") } - if config && try_link_iconv("pkg-config libiconv") { have_package_configuration("libiconv") } + config = preserving_globals { pkg_config("libiconv") } + if config && try_link_iconv("pkg-config libiconv") { pkg_config("libiconv") } cflags, ldflags, libs = config return [