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

Commit

Permalink
Merge pull request #174 from rubys/flavorjones-fix-modern-nokogiri-de…
Browse files Browse the repository at this point in the history
…tection

fix: only check for the header unless Nokogiri provides LDFLAGS
  • Loading branch information
flavorjones committed Mar 19, 2021
2 parents 3f75205 + 5043381 commit f6a7412
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 f6a7412

Please sign in to comment.