--- ext/tk/extconf.rb.orig 2011-06-30 12:53:30.000000000 +0900
+++ ext/tk/extconf.rb 2013-02-26 00:25:13.000000000 +0900
$INCFLAGS << " -I" << File.join(File.dirname(File.dirname(file)),"include") if is_win32?
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?
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?
tcllibs = libs_param + " -DSTATIC_BUILD " + fname.quote
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
if try_func(func, tcllibs, ["tcl.h"])
return [true, path, nil, tcllibs, *inc]
tklibs = libs_param + " -DSTATIC_BUILD " + fname.quote
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
if try_func(func, tklibs, ["tcl.h", "tk.h"])
return [true, path, nil, tklibs, *inc]
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"]
TclConfig_Info['TCL_LIBS'] ||= ""
- $LDFLAGS << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-R#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
+ $LDFLAGS << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-rpath,#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
TkConfig_Info['TK_LIBS'] ||= ""