summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-09 04:53:16 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-09 04:53:16 +0000
commit655e96fa59f62f7d31b2d9d470947f97aceb7b92 (patch)
tree6b6bb0a6ce9e46b326dbde9378c3791a54be1dd5 /lib/mkmf.rb
parent2a34f89e354071d09c64a93bf3498dfa108f3e8c (diff)
2000-05-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 74238b9..38ef961 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -328,6 +328,11 @@ def create_makefile(target)
end
$DLDFLAGS = CONFIG["DLDFLAGS"]
+ if $configure_args['--enable-shared']
+ $libs = CONFIG["LIBRUBYARG"] + " " + $libs
+ $DLDFLAGS = $DLDFLAGS + " -L$(topdir)"
+ end
+
if RUBY_PLATFORM =~ /beos/
$libs = $libs + " " + CONFIG["LIBRUBYARG"]
$DLDFLAGS = $DLDFLAGS + " -L" + CONFIG["prefix"] + "/lib"
@@ -338,8 +343,6 @@ def create_makefile(target)
if File.exist? target + ".def"
defflag = "--def=" + target + ".def"
end
- $libs = $libs + " " + CONFIG["LIBRUBYARG"]
- $DLDFLAGS = $DLDFLAGS + " -L$(topdir)"
end
unless $objs then
@@ -460,13 +463,10 @@ end
$OBJEXT = CONFIG["OBJEXT"]
$objs = nil
-$libs = "-lc"
+$libs = CONFIG["DLDLIBS"]
$local_flags = ""
case RUBY_PLATFORM
-when /cygwin|beos|openstep|nextstep|rhapsody/
- $libs = ""
when /mswin32/
- $libs = ""
$local_flags = "rubymw.lib -link /LIBPATH:$(topdir) /EXPORT:Init_$(TARGET)"
end
$LOCAL_LIBS = ""