[前][次][番号順一覧][スレッド一覧]

ruby-changes:24896

From: nobu <ko1@a...>
Date: Tue, 11 Sep 2012 09:44:45 +0900 (JST)
Subject: [ruby-changes:24896] nobu:r36948 (trunk): mkmf.rb: fix $LDFLAGS

nobu	2012-09-11 09:44:30 +0900 (Tue, 11 Sep 2012)

  New Revision: 36948

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36948

  Log:
    mkmf.rb: fix $LDFLAGS
    
    * lib/mkmf.rb (have_framework): insert a space between options.
      add just one -ObjC option.

  Modified files:
    trunk/lib/mkmf.rb

Index: lib/mkmf.rb
===================================================================
--- lib/mkmf.rb	(revision 36947)
+++ lib/mkmf.rb	(revision 36948)
@@ -1022,10 +1022,12 @@
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]