4 # $Id: extconf.rb 11708 2007-02-12 23:01:19Z shyouhei $
13 if %w'z libz zlib zdll'.find {|z| have_library(z, 'deflateReset')} and
14 have_header('zlib.h') then
18 message 'checking for kind of operating system... '
19 os_code = with_config('os-code') ||
20 case RUBY_PLATFORM.split('-',2)[1]
23 when /\Aos2[\-_]emx\z/ then
25 when 'mswin32', 'mingw32', 'bccwin32' then
26 # NOTE: cygwin should be regarded as Unix.
31 os_code = 'OS_' + os_code.upcase
34 'OS_MSDOS' => 'MS-DOS',
35 'OS_AMIGA' => 'Amiga',
38 'OS_ATARI' => 'Atari',
40 'OS_MACOS' => 'MacOS',
41 'OS_TOPS20' => 'TOPS20',
42 'OS_WIN32' => 'Win32',
43 'OS_VMCMS' => 'VM/CMS',
44 'OS_ZSYSTEM' => 'Z-System',
47 'OS_RISCOS' => 'RISCOS',
48 'OS_UNKNOWN' => 'Unknown',
50 unless OS_NAMES.key? os_code then
51 puts "invalid OS_CODE `#{os_code}'"
54 message "#{OS_NAMES[os_code]}\n"
55 defines << "OS_CODE=#{os_code}"
57 $defs.concat(defines.collect{|d|' -D'+d})
59 create_makefile('zlib')