ext/numo/pocketfft/extconf.rb in numo-pocketfft-0.4.0 vs ext/numo/pocketfft/extconf.rb in numo-pocketfft-0.4.1

- old
+ new

@@ -24,9 +24,15 @@ puts 'libnarray.a not found.' exit(1) end 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 + $CFLAGS = "#{$CFLAGS} -std=c99" $srcs = Dir.glob("#{$srcdir}/**/*.c").map { |path| File.basename(path) } $VPATH << "$(srcdir)/src"