mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/mkmf.rb (have_library): treat nil function name as "main".
(ruby-bugs:PR#1083) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
94d17c1f1f
commit
fb5efbaaec
2 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
Wed Aug 6 12:11:10 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Wed Aug 6 17:28:10 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/extmk.rb (extmake): pass LIBPATH to make ruby. [ruby-dev:21137]
|
||||
|
||||
|
@ -11,8 +11,8 @@ Wed Aug 6 12:11:10 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||
* lib/mkmf.rb (macro_defined?): append newline to src unless ended
|
||||
with it.
|
||||
|
||||
* lib/mkmf.rb (have_library): allow nil function name to just
|
||||
append a library. (ruby-bugs:PR#1083)
|
||||
* lib/mkmf.rb (have_library): treat nil function name as "main".
|
||||
(ruby-bugs:PR#1083)
|
||||
|
||||
* lib/mkmf.rb (pkg_config): should append additional libraries to
|
||||
$libs but not $LIBS. [ruby-dev:21137]
|
||||
|
|
|
@ -446,14 +446,14 @@ def checking_for(m)
|
|||
r
|
||||
end
|
||||
|
||||
def have_library(lib, func="main")
|
||||
func &&= ((m = "#{func}() in "; func) unless func.empty?)
|
||||
checking_for "#{m}-l#{lib}" do
|
||||
def have_library(lib, func=nil)
|
||||
func = "main" if !func or func.empty?
|
||||
checking_for "#{func}() in -l#{lib}" do
|
||||
if COMMON_LIBS.include?(lib)
|
||||
true
|
||||
else
|
||||
libs = append_library($libs, lib)
|
||||
if !func || try_func(func, libs)
|
||||
if try_func(func, libs)
|
||||
$libs = libs
|
||||
true
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue