We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c64a5a commit 9ed9d6dCopy full SHA for 9ed9d6d
ext/zlib/extconf.rb
@@ -11,10 +11,9 @@
11
dir_config 'zlib'
12
13
libs = $libs
14
-if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have_library(z, 'deflateReset')} and
15
- have_header('zlib.h') then
16
- have_zlib = true
17
-else
+have_zlib = %w'z libz zlib1 zlib zdll zlibwapi'.any? {|z| have_library(z, 'deflateReset(NULL)', 'zlib.h')}
+
+unless have_zlib
18
$libs = libs
19
unless File.directory?(zsrc = "#{$srcdir}/zlib")
20
dirs = Dir.open($srcdir) {|z| z.grep(/\Azlib-\d+[.\d]*\z/) {|x|"#{$srcdir}/#{x}"}}
0 commit comments