Skip to content
Permalink
Browse files

Use default lib paths as a last resort

  • Loading branch information
muff1nman committed Apr 19, 2014
1 parent c501345 commit a0c8bc32cfc11e61c5b9703bff243934c6509210
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/mkmf.rb
@@ -467,7 +467,7 @@ def try_do(src, command, *opts, &b)
end
end

def link_command(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
def link_command(ldflags, opt="", libpath=$LIBPATH|$DEFLIBPATH)
librubyarg = $extmk ? $LIBRUBYARG_STATIC : "$(LIBRUBYARG)"
conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote,
'src' => "#{CONFTEST_C}",
@@ -503,7 +503,7 @@ def cpp_command(outfile, opt="")
conf)
end

def libpathflag(libpath=$DEFLIBPATH|$LIBPATH)
def libpathflag(libpath=$LIBPATH|$DEFLIBPATH)
libpath.map{|x|
case x
when "$(topdir)", /\A\./
@@ -2125,7 +2125,7 @@ def depend_rules(depend)
#
def create_makefile(target, srcprefix = nil)
$target = target
libpath = $DEFLIBPATH|$LIBPATH
libpath = $LIBPATH|$DEFLIBPATH
message "creating Makefile\n"
MakeMakefile.rm_f "#{CONFTEST}*"
if CONFIG["DLEXT"] == $OBJEXT
@@ -2206,7 +2206,7 @@ def create_makefile(target, srcprefix = nil)
conf = yield(conf) if block_given?
mfile.puts(conf)
mfile.print "
libpath = #{($DEFLIBPATH|$LIBPATH).join(" ")}
libpath = #{($LIBPATH|$DEFLIBPATH).join(" ")}
LIBPATH = #{libpath}
DEFFILE = #{deffile}

1 comment on commit a0c8bc3

@jeffguillaume

This comment has been minimized.

Copy link

jeffguillaume commented on a0c8bc3 Jul 17, 2018

Making these changes allowed me to install the pg gem properly.

Thank you.

Please sign in to comment.
You can’t perform that action at this time.