mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Found library is not usable if the header is not found
This commit is contained in:
parent
e359d637ee
commit
eecc4570cd
1 changed files with 2 additions and 1 deletions
|
@ -10,11 +10,12 @@ 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
|
||||
$libs = libs
|
||||
unless File.directory?(zsrc = "#{$srcdir}/zlib")
|
||||
dirs = Dir.open($srcdir) {|z| z.grep(/\Azlib-\d+[.\d]*\z/) {|x|"#{$srcdir}/#{x}"}}
|
||||
dirs.delete_if {|x| !File.directory?(x)}
|
||||
|
|
Loading…
Reference in a new issue