зеркало из https://github.com/github/ruby.git
[ruby/zlib] Check for functions with arguments and the header
With arguments, mkmf skips compilation check for the function as RHS. https://github.com/ruby/zlib/commit/9ed9d6d36e
This commit is contained in:
Родитель
9d078fe477
Коммит
0a2bf5f1e2
|
@ -11,10 +11,9 @@ require 'rbconfig'
|
|||
dir_config 'zlib'
|
||||
|
||||
libs = $libs
|
||||
if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have_library(z, 'deflateReset')} and
|
||||
have_header('zlib.h') then
|
||||
have_zlib = true
|
||||
else
|
||||
have_zlib = %w'z libz zlib1 zlib zdll zlibwapi'.any? {|z| have_library(z, 'deflateReset(NULL)', 'zlib.h')}
|
||||
|
||||
unless have_zlib
|
||||
$libs = libs
|
||||
unless File.directory?(zsrc = "#{$srcdir}/zlib")
|
||||
dirs = Dir.open($srcdir) {|z| z.grep(/\Azlib-\d+[.\d]*\z/) {|x|"#{$srcdir}/#{x}"}}
|
||||
|
|
Загрузка…
Ссылка в новой задаче