Skip to content

Commit e63cd52

Browse files
committed
Hopefully, fix to #591.
1 parent 5ea4d7a commit e63cd52

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/nmatrix/mkmf.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,10 @@ def gplusplus_version
9191
$CXXFLAGS += " -O3 -std=#{$CXX_STANDARD} " #-fmax-errors=10 -save-temps
9292
#$CXXFLAGS += " -static -O0 -g -std=#{$CXX_STANDARD} "
9393

94-
CONFIG['warnflags'].gsub!('-Wshorten-64-to-32', '') # doesn't work except in Mac-patched gcc (4.2)
95-
CONFIG['warnflags'].gsub!('-Wdeclaration-after-statement', '')
96-
CONFIG['warnflags'].gsub!('-Wimplicit-function-declaration', '')
97-
94+
if CONFIG.has_key?('warnflags')
95+
CONFIG['warnflags'].gsub!('-Wshorten-64-to-32', '') # doesn't work except in Mac-patched gcc (4.2)
96+
CONFIG['warnflags'].gsub!('-Wdeclaration-after-statement', '')
97+
CONFIG['warnflags'].gsub!('-Wimplicit-function-declaration', '')
98+
end
99+
98100
have_func("rb_array_const_ptr", "ruby.h")

0 commit comments

Comments
 (0)