ext/rubysl/zlib/extconf.rb in rubysl-zlib-2.0.0 vs ext/rubysl/zlib/extconf.rb in rubysl-zlib-2.0.1

- old
+ new

@@ -1,23 +1,23 @@ # # extconf.rb # -# $Id: extconf.rb 26353 2010-01-19 05:14:29Z usa $ +# $Id: extconf.rb 37527 2012-11-06 18:50:53Z luislavena $ # require 'mkmf' require 'rbconfig' dir_config 'zlib' -if %w'z libz zlib1 zlib zdll'.find {|z| have_library(z, 'deflateReset')} and +if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have_library(z, 'deflateReset')} and have_header('zlib.h') then defines = [] - message 'checking for kind of operating system... ' + Logging::message 'checking for kind of operating system... ' os_code = with_config('os-code') || case RUBY_PLATFORM.split('-',2)[1] when 'amigaos' then os_code = 'AMIGA' when /\Aos2[\-_]emx\z/ then @@ -46,16 +46,13 @@ 'OS_QDOS' => 'QDOS', 'OS_RISCOS' => 'RISCOS', 'OS_UNKNOWN' => 'Unknown', } unless OS_NAMES.key? os_code then - puts "invalid OS_CODE `#{os_code}'" - exit + raise "invalid OS_CODE `#{os_code}'" end - message "#{OS_NAMES[os_code]}\n" + Logging::message "#{OS_NAMES[os_code]}\n" defines << "OS_CODE=#{os_code}" - - $CFLAGS += " -Wno-pointer-sign" $defs.concat(defines.collect{|d|' -D'+d}) have_func('crc32_combine', 'zlib.h') have_func('adler32_combine', 'zlib.h')