aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/extconf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-17 01:37:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-17 01:37:08 +0000
commit58e7c45fc7398496e17760ac4b4d588e51b6b9fc (patch)
tree4d085847354b6d02fbe3988e2a315e931bc75032 /ext/tk/extconf.rb
parent9914991769fd9e4cf67e5a9f8c36f1f18efe9070 (diff)
downloadruby-58e7c45fc7398496e17760ac4b4d588e51b6b9fc.tar.gz
fix static-linked-ext
* lib/mkmf.rb (MakeMakefile#have_framework): combine -framework option and its argument with an equal sign not to be separated in merge_libs. * ext/tk/extconf.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/extconf.rb')
-rw-r--r--ext/tk/extconf.rb26
1 files changed, 14 insertions, 12 deletions
diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb
index be7ebb2616..e7d12ebf9b 100644
--- a/ext/tk/extconf.rb
+++ b/ext/tk/extconf.rb
@@ -1463,7 +1463,7 @@ end
def setup_for_macosx_framework(tclver, tkver)
# use framework, but no tclConfig.sh
unless $LDFLAGS && $LDFLAGS.include?('-framework')
- ($LDFLAGS ||= "") << ' -framework Tk -framework Tcl'
+ ($LDFLAGS ||= "") << ' -framework=Tk -framework=Tcl'
end
if TkLib_Config["tcl-framework-header"]
@@ -1947,53 +1947,55 @@ if TkLib_Config["tcltk-framework"]
puts("Use MacOS X Frameworks.")
($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} -Wl,-R#{TkLib_Config["tcl-build-dir"].quote}" if TkLib_Config["tcl-build-dir"]
+ libs = ''
if tcl_cfg_dir
TclConfig_Info['TCL_LIBS'] ||= ""
($INCFLAGS ||= "") << ' ' << TclConfig_Info['TCL_INCLUDE_SPEC']
- $LDFLAGS << ' ' << TclConfig_Info['TCL_LIBS']
+ libs << ' ' << TclConfig_Info['TCL_LIBS']
if stubs
if TkLib_Config["tcl-build-dir"] &&
TclConfig_Info['TCL_BUILD_STUB_LIB_SPEC'] &&
!TclConfig_Info['TCL_BUILD_STUB_LIB_SPEC'].strip.empty?
- $LDFLAGS << ' ' << TclConfig_Info['TCL_BUILD_STUB_LIB_SPEC']
+ libs << ' ' << TclConfig_Info['TCL_BUILD_STUB_LIB_SPEC']
else
- $LDFLAGS << ' ' << TclConfig_Info['TCL_STUB_LIB_SPEC']
+ libs << ' ' << TclConfig_Info['TCL_STUB_LIB_SPEC']
end
else
if TkLib_Config["tcl-build-dir"] &&
TclConfig_Info['TCL_BUILD_LIB_SPEC'] &&
!TclConfig_Info['TCL_BUILD_LIB_SPEC'].strip.empty?
- $LDFLAGS << ' ' << TclConfig_Info['TCL_BUILD_LIB_SPEC']
+ libs << ' ' << TclConfig_Info['TCL_BUILD_LIB_SPEC']
else
- $LDFLAGS << ' ' << TclConfig_Info['TCL_LIB_SPEC']
+ libs << ' ' << TclConfig_Info['TCL_LIB_SPEC']
end
end
end
- $LDFLAGS << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-R#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
+ libs << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-R#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
if tk_cfg_dir
TkConfig_Info['TK_LIBS'] ||= ""
($INCFLAGS ||= "") << ' ' << TkConfig_Info['TK_INCLUDE_SPEC']
- $LDFLAGS << ' ' << TkConfig_Info['TK_LIBS']
+ libs << ' ' << TkConfig_Info['TK_LIBS']
if stubs
if TkLib_Config["tk-build-dir"] &&
TclConfig_Info['TK_BUILD_STUB_LIB_SPEC'] &&
!TclConfig_Info['TK_BUILD_STUB_LIB_SPEC'].strip.empty?
- $LDFLAGS << ' ' << TkConfig_Info['TK_BUILD_STUB_LIB_SPEC']
+ libs << ' ' << TkConfig_Info['TK_BUILD_STUB_LIB_SPEC']
else
- $LDFLAGS << ' ' << TkConfig_Info['TK_STUB_LIB_SPEC']
+ libs << ' ' << TkConfig_Info['TK_STUB_LIB_SPEC']
end
else
if TkLib_Config["tk-build-dir"] &&
TclConfig_Info['TK_BUILD_LIB_SPEC'] &&
!TclConfig_Info['TK_BUILD_LIB_SPEC'].strip.empty?
- $LDFLAGS << ' ' << TkConfig_Info['TK_BUILD_LIB_SPEC']
+ libs << ' ' << TkConfig_Info['TK_BUILD_LIB_SPEC']
else
- $LDFLAGS << ' ' << TkConfig_Info['TK_LIB_SPEC']
+ libs << ' ' << TkConfig_Info['TK_LIB_SPEC']
end
end
end
+ $LDFLAGS << ' ' << libs.gsub(/((?:\A|\s)-framework)\s/, '\1=') << ' -ltk -ltcl'
setup_for_macosx_framework(tclver, tkver) if tcl_cfg_dir && tk_cfg_dir
end