diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-17 10:52:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-17 10:52:17 +0000 |
commit | 8cfce15387f3ff9d922e60b3ff53cf874215fdf5 (patch) | |
tree | 1cf65a06ea52e08647c56685b59bae6ba6131a52 | |
parent | 3842ebb43d9e55e6578f885061d8c330a0afb90f (diff) | |
download | ruby-8cfce15387f3ff9d922e60b3ff53cf874215fdf5.tar.gz |
fiddle: --disable-bundled-libffi
* ext/fiddle/extconf.rb: disable bundled libffi if explicitly
disabled by --disable-bundled-libffi.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ext/fiddle/extconf.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb index 1adbc11eca..37bbfdc247 100644 --- a/ext/fiddle/extconf.rb +++ b/ext/fiddle/extconf.rb @@ -2,7 +2,8 @@ require 'mkmf' # :stopdoc: -if ! enable_config('bundled-libffi', false) +bundle = enable_config('bundled-libffi') +if ! bundle dir_config 'libffi' pkg_config("libffi") and @@ -16,7 +17,8 @@ if ! enable_config('bundled-libffi', false) end and (have_library('ffi') || have_library('libffi')) end or begin - ver = Dir.glob("#{$srcdir}/libffi-*/") + ver = bundle != false && + Dir.glob("#{$srcdir}/libffi-*/") .map {|n| File.basename(n)} .max_by {|n| n.scan(/\d+/).map(&:to_i)} unless ver |