1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/zlib/extconf.rb
kosaki 4ad2057f27 * ChangeLog: Good-bye OS/2.
* common.mk: ditto.
* configure.in: ditto.
* dln_find.c: ditto.
* ext/Setup.emx: ditto.
* ext/extmk.rb: ditto.
* ext/socket/extconf.rb: ditto.
* ext/zlib/extconf.rb: ditto.
* file.c: ditto.
* include/ruby/defines.h: ditto.
* io.c: ditto.
* lib/mkmf.rb: ditto.
* missing/os2.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* NEWS: announce OS/2 is no longer supported.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-18 01:18:34 +00:00

61 lines
1.3 KiB
Ruby

#
# extconf.rb
#
# $Id$
#
require 'mkmf'
require 'rbconfig'
dir_config 'zlib'
if %w'z libz zlib1 zlib zdll zlibwapi'.find {|z| have_library(z, 'deflateReset')} and
have_header('zlib.h') then
defines = []
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 /mswin|mingw|bccwin/ then
# NOTE: cygwin should be regarded as Unix.
os_code = 'WIN32'
else
os_code = 'UNIX'
end
os_code = 'OS_' + os_code.upcase
OS_NAMES = {
'OS_MSDOS' => 'MS-DOS',
'OS_AMIGA' => 'Amiga',
'OS_VMS' => 'VMS',
'OS_UNIX' => 'Unix',
'OS_ATARI' => 'Atari',
'OS_MACOS' => 'MacOS',
'OS_TOPS20' => 'TOPS20',
'OS_WIN32' => 'Win32',
'OS_VMCMS' => 'VM/CMS',
'OS_ZSYSTEM' => 'Z-System',
'OS_CPM' => 'CP/M',
'OS_QDOS' => 'QDOS',
'OS_RISCOS' => 'RISCOS',
'OS_UNKNOWN' => 'Unknown',
}
unless OS_NAMES.key? os_code then
raise "invalid OS_CODE `#{os_code}'"
end
Logging::message "#{OS_NAMES[os_code]}\n"
defines << "OS_CODE=#{os_code}"
$defs.concat(defines.collect{|d|' -D'+d})
have_func('crc32_combine', 'zlib.h')
have_func('adler32_combine', 'zlib.h')
have_type('z_crc_t', 'zlib.h')
create_makefile('zlib')
end