ext/fiddle/extconf.rb in fiddle-1.1.3 vs ext/fiddle/extconf.rb in fiddle-1.1.4

- old
+ new

@@ -1,13 +1,21 @@ # frozen_string_literal: true -require 'mkmf' +require "rbconfig" + unless RUBY_ENGINE == "ruby" - File.write('Makefile', dummy_makefile("").join) + File.write('Makefile', <<-MAKEFILE) +all install clean: + #{RbConfig::CONFIG["NULLCMD"]} + +.PHONY: all install clean + MAKEFILE return end +require 'mkmf' + # :stopdoc: def gcc? RbConfig::CONFIG["GCC"] == "yes" end @@ -66,14 +74,9 @@ $defs.push('-DUSE_HEADER_HACKS') have_ffi_header = true end if have_ffi_header && (have_library('ffi') || have_library('libffi')) have_libffi = true - checking_for("undefined FFI_GO_CLOSURES is used") do - if egrep_cpp(/warning: 'FFI_GO_CLOSURES' is not defined/, cpp_include(ffi_header), "2>&1") - $defs.push('-DFFI_GO_CLOSURES=0') - end - end end end unless have_libffi if bundle