Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Commit

Permalink
fix: only check for the header unless Nokogiri provides LDFLAGS
Browse files Browse the repository at this point in the history
in which case, then we verify that we can resolve libxml symbols.

Related to a41ab09 which checked symbol resolution on both Linux
and Windows; but it fails (and is unnecessary) on Linux, leading to
seeing this at installation:

> checking for xmlNewDoc() in libxml/tree.h... no
  • Loading branch information
flavorjones committed Mar 19, 2021
1 parent 3f75205 commit 5043381
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/nokogumbo/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ def modern_nokogiri?
if modern_nokogiri?
append_cflags(Nokogiri::VERSION_INFO["nokogiri"]["cppflags"])
append_ldflags(Nokogiri::VERSION_INFO["nokogiri"]["ldflags"]) # may be nil for nokogiri pre-1.11.2
have_libxml2 = have_func("xmlNewDoc", "libxml/tree.h")
have_libxml2 = if Nokogiri::VERSION_INFO["nokogiri"]["ldflags"].empty?
have_header('libxml/tree.h')
else
have_func("xmlNewDoc", "libxml/tree.h")
end
end

if !have_libxml2
Expand Down

0 comments on commit 5043381

Please sign in to comment.