From 11dbedfaad4a9a9521ece2198a8dc491678b1902 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Wed, 29 Aug 2007 04:06:12 +0000 Subject: add tag v1_8_6_5001 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_8_6_5001@13304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby_1_8_6/ext/zlib/extconf.rb | 61 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 ruby_1_8_6/ext/zlib/extconf.rb (limited to 'ruby_1_8_6/ext/zlib/extconf.rb') diff --git a/ruby_1_8_6/ext/zlib/extconf.rb b/ruby_1_8_6/ext/zlib/extconf.rb new file mode 100644 index 0000000000..b4e76af3c6 --- /dev/null +++ b/ruby_1_8_6/ext/zlib/extconf.rb @@ -0,0 +1,61 @@ +# +# extconf.rb +# +# $Id$ +# + +require 'mkmf' +require 'rbconfig' + +dir_config 'zlib' + + +if %w'z libz zlib zdll'.find {|z| have_library(z, 'deflateReset')} and + have_header('zlib.h') then + + defines = [] + + 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 + os_code = 'OS2' + when 'mswin32', 'mingw32', 'bccwin32' 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_OS2' => 'OS/2', + '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 + puts "invalid OS_CODE `#{os_code}'" + exit + end + message "#{OS_NAMES[os_code]}\n" + defines << "OS_CODE=#{os_code}" + + $defs.concat(defines.collect{|d|' -D'+d}) + + create_makefile('zlib') + +end -- cgit v1.2.3