From 8cfce15387f3ff9d922e60b3ff53cf874215fdf5 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 17 Jan 2015 10:52:17 +0000 Subject: 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 --- ext/fiddle/extconf.rb | 6 ++++-- 1 file 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 -- cgit v1.2.3