Skip to content

Commit

Permalink
Merge pull request #1685 from jeremyevans/openbsd
Browse files Browse the repository at this point in the history
Fix a couple of issues on OpenBSD
  • Loading branch information
flavorjones authored Nov 13, 2017
2 parents 7eb8cf0 + 6b65ecb commit d020235
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,11 @@ def using_system_libraries?
end

if openbsd? && !using_system_libraries?
ENV['CC'] ||= find_executable('egcc') or
abort "Please install gcc 4.9+ from ports using `pkg_add -v gcc`"
if `#{ENV['CC'] || '/usr/bin/cc'} -v 2>&1` !~ /clang/
ENV['CC'] ||= find_executable('egcc') or
abort "Please install gcc 4.9+ from ports using `pkg_add -v gcc`"
end
ENV['CFLAGS'] = "#{ENV['CFLAGS']} -I /usr/local/include"
end

RbConfig::MAKEFILE_CONFIG['CC'] = ENV['CC'] if ENV['CC']
Expand Down

0 comments on commit d020235

Please sign in to comment.