summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-04 12:10:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-04 12:10:20 +0000
commitbd0ef220f06c53dfd052ad70601aec2c39beb9bc (patch)
treecfcedac27fe3bee94b4fe712a8d39caf43ef4743 /ext
parent5b0fb1aaddad03e111606e0d0eaf8ed9c9f7b0b6 (diff)
ext/tk/extconf.rb: fix build error with tk variant
* ext/tk/extconf.rb: use -rpath linker option instead of -R, to fix build error with tk variant. incorporate from MacPorts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/tk/extconf.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb
index 6e2ddb7..eeb7812 100644
--- a/ext/tk/extconf.rb
+++ b/ext/tk/extconf.rb
@@ -623,7 +623,7 @@ def libcheck_for_tclConfig(tcldir, tkdir, tclconf, tkconf)
$INCFLAGS << " -I" << File.join(File.dirname(File.dirname(file)),"include") if is_win32?
else
tcllibs = append_library($libs, libname)
- tcllibs = "-L#{tcldir.quote} -Wl,-R#{tcldir.quote} " + tcllibs
+ tcllibs = "-L#{tcldir.quote} -Wl,-rpath,#{tcldir.quote} " + tcllibs
# FIX ME: avoid pathname trouble (fail to find) on MinGW.
$INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32?
@@ -665,7 +665,7 @@ def libcheck_for_tclConfig(tcldir, tkdir, tclconf, tkconf)
else
tklibs = append_library("", libname)
#tklibs = append_library("", $1)
- tklibs = "-L#{tkdir.quote} -Wl,-R#{tkdir.quote} " + tklibs
+ tklibs = "-L#{tkdir.quote} -Wl,-rpath,#{tkdir.quote} " + tklibs
# FIX ME: avoid pathname trouble (fail to find) on MinGW.
$INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32?
@@ -1161,7 +1161,7 @@ def find_tcl(tcllib, stubs, version, *opt_paths)
tcllibs = libs_param + " -DSTATIC_BUILD " + fname.quote
else
tcllibs = append_library($libs, lib_w_sufx)
- tcllibs = "-L#{path.quote} -Wl,-R#{path.quote} " + tcllibs
+ tcllibs = "-L#{path.quote} -Wl,-rpath,#{path.quote} " + tcllibs
end
if try_func(func, tcllibs, ["tcl.h"])
return [true, path, nil, tcllibs, *inc]
@@ -1300,7 +1300,7 @@ def find_tk(tklib, stubs, version, *opt_paths)
tklibs = libs_param + " -DSTATIC_BUILD " + fname.quote
else
tklibs = append_library($libs, lib_w_sufx)
- tklibs = "-L#{path.quote} -Wl,-R#{path.quote} " + tklibs
+ tklibs = "-L#{path.quote} -Wl,-rpath,#{path.quote} " + tklibs
end
if try_func(func, tklibs, ["tcl.h", "tk.h"])
return [true, path, nil, tklibs, *inc]
@@ -2003,7 +2003,7 @@ $defs += collect_tcltk_defs(TclConfig_Info['TCL_DEFS'], TkConfig_Info['TK_DEFS']
# MacOS X Frameworks?
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"]
+ ($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} -Wl,-rpath,#{TkLib_Config["tcl-build-dir"].quote}" if TkLib_Config["tcl-build-dir"]
libs = ''
if tcl_cfg_dir
@@ -2029,7 +2029,7 @@ if TkLib_Config["tcltk-framework"]
end
end
- libs << " -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,-rpath,#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
if tk_cfg_dir
TkConfig_Info['TK_LIBS'] ||= ""