From ab7d608632f35e8277ce586d89608aa6cfb60482 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 4 Jul 2013 15:29:50 +0000 Subject: mkmf.rb: old syntax * lib/mkmf.rb (have_framework): get rid of newer syntax to run with ruby 1.8 for cross compiling. [ruby-core:55745] [Bug #8593] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/mkmf.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/mkmf.rb b/lib/mkmf.rb index a35be75142..749e7a5c7c 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -1084,8 +1084,12 @@ SRC # If +fw+ is a pair of the framework name and its header file name # that header file is checked, instead of the normally used header # file which is named same as the framework. - def have_framework((fw, header), &b) - header ||= "#{fw}.h" + def have_framework(fw, &b) + if Array === fw + fw, header = *fw + else + header = "#{fw}.h" + end checking_for fw do src = cpp_include("#{fw}/#{header}") << "\n" "int main(void){return 0;}" opt = " -framework #{fw}" -- cgit v1.2.3