ext/numo/libsvm/extconf.rb in numo-libsvm-2.1.0 vs ext/numo/libsvm/extconf.rb in numo-libsvm-2.1.1

- old
+ new

@@ -18,9 +18,15 @@ end end abort 'libnarray.a not found.' unless have_library('narray', 'nary_new') end +if RUBY_PLATFORM.match?(/darwin/) && Gem::Version.new('3.1.0') <= Gem::Version.new(RUBY_VERSION) + if try_link('int main(void){return 0;}', '-Wl,-undefined,dynamic_lookup') + $LDFLAGS << ' -Wl,-undefined,dynamic_lookup' + end +end + abort 'libstdc++ is not found.' unless have_library('stdc++') $srcs = Dir.glob("#{$srcdir}/**/*.cpp").map { |path| File.basename(path) } $INCFLAGS << " -I$(srcdir)/src" $VPATH << "$(srcdir)/src"