mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mkmf.rb: fix $LDFLAGS
* lib/mkmf.rb (have_framework): insert a space between options. add just one -ObjC option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f228a4b209
commit
9445ab2d98
1 changed files with 3 additions and 1 deletions
|
@ -1022,10 +1022,12 @@ SRC
|
|||
def have_framework(fw, &b)
|
||||
checking_for fw do
|
||||
src = cpp_include("#{fw}/#{fw}.h") << "\n" "int main(void){return 0;}"
|
||||
if try_link(src, opt = "-ObjC -framework #{fw}", &b)
|
||||
opt = " -framework #{fw}"
|
||||
if 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 << opt
|
||||
true
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue