Skip to content

Commit

Permalink
Add warnings about using Ruby < 1.8.5 and IM < 6.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
rmagick committed Mar 3, 2009
1 parent f692681 commit 55d5151
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions ext/RMagick/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,24 @@ def check_multiple_imagemagick_versions()
end


unless checking_for("Ruby version >= 1.8.5") do
version = RUBY_VERSION.tr(".","").to_i
version >= 185
end
msg = <<END_OLD_RUBY_WARNING
#{"=" * 70}
warning: The RMagick 2 prerequisites are changing.
This is the last release that will support Ruby #{RUBY_VERSION}
The next release will require Ruby 1.8.5 or later.
#{"=" * 70}
END_OLD_RUBY_WARNING

Logging::message msg
message msg
end



# Magick-config is not available on Windows
Expand All @@ -124,6 +142,26 @@ def check_multiple_imagemagick_versions()
exit_failure "Can't install RMagick #{RMAGICK_VERS}. You must have ImageMagick #{MIN_IM_VERS} or later.\n"
end

unless checking_for("ImageMagick version >= 6.3.5") do
version = `Magick-config --version`.chomp.tr(".","").to_i
version >= 635
end
msg = <<END_OLD_IM_WARNING
#{"=" * 70}
warning: The RMagick 2 prerequisites are changing.
This is the last release that will support ImageMagick #{`Magick-config --version`.chomp}
The next release will require ImageMagick 6.3.5 or later.
#{"=" * 70}
END_OLD_IM_WARNING

Logging::message msg
message msg
end



$magick_version = `Magick-config --version`.chomp

# Ensure ImageMagick is not configured for HDRI
Expand Down Expand Up @@ -180,8 +218,6 @@ def check_multiple_imagemagick_versions()


have_func("snprintf", headers)


["AcquireQuantumMemory", # 6.3.5-9
"AcquireImage", # 6.4.1
"AffinityImage", # 6.4.3-6
Expand Down

0 comments on commit 55d5151

Please sign in to comment.