mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mkmf.rb: try without -ObjC option
* lib/mkmf.rb (have_framework): try without -ObjC option first as MacPorts GCCs do not support it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e3230f154c
commit
8a22a0530e
2 changed files with 5 additions and 3 deletions
|
@ -1092,11 +1092,11 @@ SRC
|
|||
checking_for fw do
|
||||
src = cpp_include("#{fw}/#{header}") << "\n" "int main(void){return 0;}"
|
||||
opt = " -framework #{fw}"
|
||||
if try_link(src, "-ObjC#{opt}", &b)
|
||||
if try_link(src, opt, &b) or (objc = try_link(src, "-ObjC#{opt}", &b))
|
||||
$defs.push(format("-DHAVE_FRAMEWORK_%s", fw.tr_cpp))
|
||||
# TODO: non-worse way than this hack, to get rid of separating
|
||||
# option and its argument.
|
||||
$LDFLAGS << " -ObjC" unless /(\A|\s)-ObjC(\s|\z)/ =~ $LDFLAGS
|
||||
$LDFLAGS << " -ObjC" if objc and /(\A|\s)-ObjC(\s|\z)/ !~ $LDFLAGS
|
||||
$LIBS << opt
|
||||
true
|
||||
else
|
||||
|
|
|
@ -26,7 +26,9 @@ class TestMkmf
|
|||
|
||||
def test_multi_frameworks
|
||||
assert(have_framework("CoreFoundation"), mkmflog("try as Objective-C"))
|
||||
assert(have_framework("Cocoa"), mkmflog("try as Objective-C"))
|
||||
create_framework("MkmfTest") do |fw|
|
||||
assert(have_framework(fw), MKMFLOG)
|
||||
end
|
||||
end
|
||||
|
||||
def test_empty_framework
|
||||
|
|
Loading…
Add table
Reference in a new issue