Permalink
Browse files

Make sure ENV['CFLAGS'] is valid before making further tweaks to $CFL…

…AGS.
  • Loading branch information...
knu committed Jul 23, 2014
1 parent 5edaa56 commit 439ab0e2a3c03d162d63bc5fa118872ed1c8c565
Showing with 3 additions and 1 deletion.
  1. +3 −1 ext/nokogiri/extconf.rb
View
@@ -315,9 +315,11 @@ def patch
$LIBRUBYARG_STATIC.gsub!(/-static/, '')
end
-$CFLAGS << " #{ENV["CFLAGS"]}"
$LIBS << " #{ENV["LIBS"]}"
+# Read CFLAGS from ENV and make sure compiling works.
+add_cflags(ENV["CFLAGS"])
+
case RbConfig::CONFIG['target_os']
when 'mingw32', /mswin/
windows_p = true

0 comments on commit 439ab0e

Please sign in to comment.