summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
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 74238b98b05..38ef9615c2d 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 = ""