diff --git a/bin/passenger-install-apache2-module b/bin/passenger-install-apache2-module index 51d2a0ae5a..f1e3d81039 100755 --- a/bin/passenger-install-apache2-module +++ b/bin/passenger-install-apache2-module @@ -46,9 +46,11 @@ class Installer Dependencies::RubyGems, Dependencies::Rake, Dependencies::Apache2, - Dependencies::Apache2_DevHeaders, - Dependencies::FastThread + Dependencies::Apache2_DevHeaders ] + if Dependencies.fastthread_required? + REQUIRED_DEPENDENCIES << Dependencies::FastThread + end # Some broken servers don't have apr-config or apu-config installed. # Nevertheless, it is possible to compile Apache modules if Apache # was configured with --included-apr. So here we check whether diff --git a/lib/phusion_passenger/dependencies.rb b/lib/phusion_passenger/dependencies.rb index 5b5eb20eca..d00ea60585 100644 --- a/lib/phusion_passenger/dependencies.rb +++ b/lib/phusion_passenger/dependencies.rb @@ -90,6 +90,12 @@ def call_init_block # Namespace which contains the different dependencies that Passenger may require. # See Dependency for more information. module Dependencies # :nodoc: all + # Returns whether fastthread is a required dependency for the current + # Ruby interpreter. + def self.fastthread_required? + return (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") && RUBY_VERSION < "1.8.7" + end + GCC = Dependency.new do |dep| dep.name = "GNU C++ compiler" dep.define_checker do |result|