summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-22 18:53:33 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-05-22 18:53:33 +0000
commiteee2a06bbe2c5b8f4a5edfb06ecd1beabb3d3c67 (patch)
treeb78b3d94711dadc1d5e7eef3aa6c924748e1bd62 /lib
parent27b64608e56d45f68a38ac3ff8034f4b385196ca (diff)
merge -c 12206
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@12328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index c4e4c04..2189a43 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -291,7 +291,12 @@ end
def libpathflag(libpath=$DEFLIBPATH|$LIBPATH)
libpath.map{|x|
- (x == "$(topdir)" ? LIBPATHFLAG : LIBPATHFLAG+RPATHFLAG) % x.quote
+ case x
+ when "$(topdir)", /\A\./
+ LIBPATHFLAG
+ else
+ LIBPATHFLAG+RPATHFLAG
+ end % x.quote
}.join
end
@@ -1425,6 +1430,7 @@ def init_mkmf(config = CONFIG)
$LIBRUBYARG_STATIC = config['LIBRUBYARG_STATIC']
$LIBRUBYARG_SHARED = config['LIBRUBYARG_SHARED']
$DEFLIBPATH = $extmk ? ["$(topdir)"] : CROSS_COMPILING ? [] : ["$(libdir)"]
+ $DEFLIBPATH.unshift(".")
$LIBPATH = []
$INSTALLFILES = nil
@@ -1516,8 +1522,8 @@ LINK_SO = config_string('LINK_SO') ||
if CONFIG["DLEXT"] == $OBJEXT
"ld $(DLDFLAGS) -r -o $@ $(OBJS)\n"
else
- "$(LDSHARED) $(DLDFLAGS) $(LIBPATH) #{OUTFLAG}$@ " \
- "$(OBJS) $(LOCAL_LIBS) $(LIBS)"
+ "$(LDSHARED) #{OUTFLAG}$@ $(OBJS) " \
+ "$(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)"
end
LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L"%s"'
RPATHFLAG = config_string('RPATHFLAG') || ''