diff options
author | Joel Low <joel@joelsplace.sg> | 2014-12-01 09:19:02 +0800 |
---|---|---|
committer | Joel Low <joel@joelsplace.sg> | 2014-12-01 09:19:02 +0800 |
commit | fc5989a1cec956a2f8aecc1dade57fa6814b0d39 (patch) | |
tree | a9e4d73d4dc63a1f37b671240eb475aab1fd9726 | |
parent | 30808b769e4f0656092b7b3185c2f4149211d6eb (diff) | |
download | ffi-fc5989a1cec956a2f8aecc1dade57fa6814b0d39.tar.gz |
Fix compatibility with newer libffi on Windows, if we are using a system-provided version)
-rw-r--r-- | ext/ffi_c/extconf.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/ffi_c/extconf.rb b/ext/ffi_c/extconf.rb index b4d75b5..180634f 100644 --- a/ext/ffi_c/extconf.rb +++ b/ext/ffi_c/extconf.rb @@ -33,10 +33,11 @@ if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx' $defs << "-DHAVE_EXTCONF_H" if $defs.empty? # needed so create_header works $defs << "-DUSE_INTERNAL_LIBFFI" unless libffi_ok $defs << "-DRUBY_1_9" if RUBY_VERSION >= "1.9.0" + $defs << "-DFFI_BUILDING" if RbConfig::CONFIG['host_os'] =~ /mswin/ # for compatibility with newer libffi create_header - $LOCAL_LIBS << " ./libffi/.libs/libffi_convenience.lib" if RbConfig::CONFIG['host_os'] =~ /mswin/ + $LOCAL_LIBS << " ./libffi/.libs/libffi_convenience.lib" if !libffi_ok && RbConfig::CONFIG['host_os'] =~ /mswin/ create_makefile("ffi_c") unless libffi_ok |