diff options
| -rw-r--r-- | ChangeLog | 10 | ||||
| -rw-r--r-- | lib/mkmf.rb | 16 |
2 files changed, 23 insertions, 3 deletions
@@ -1,3 +1,13 @@ +Sun Mar 3 12:35:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/mkmf.rb (MakeMakefile#libpath_env): set runtime library path for + the case rpath is disabled. + +Sun Mar 3 12:34:29 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * lib/mkmf.rb (MakeMakefile#libpath_env): set runtime library path for + the case rpath is disabled. + Sun Mar 3 12:17:47 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> * lib/rubygems/ext/ext_conf_builder.rb diff --git a/lib/mkmf.rb b/lib/mkmf.rb index dcf1de4242..23bb402c95 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -350,6 +350,16 @@ module MakeMakefile end end + def libpath_env + if libpathenv = CONFIG["LIBPATHENV"] + pathenv = ENV[libpathenv] + libpath = RbConfig.expand($DEFLIBPATH.join(File::PATH_SEPARATOR)) + {libpathenv => [libpath, pathenv].compact.join(File::PATH_SEPARATOR)} + else + {} + end + end + def xsystem command, opts = nil varpat = /\$\((\w+)\)|\$\{(\w+)\}/ if varpat =~ command @@ -362,12 +372,12 @@ module MakeMakefile if opts and opts[:werror] result = nil Logging.postpone do |log| - result = (system(command) and File.zero?(log.path)) + result = (system(libpath_env, command) and File.zero?(log.path)) "" end result else - system(command) + system(libpath_env, command) end end end @@ -380,7 +390,7 @@ module MakeMakefile else puts "| #{command}" end - IO.popen(command, *mode, &block) + IO.popen(libpath_env, command, *mode, &block) end end |
