This module autodetects various platform-specific information, and provides that information through constants.

Users can change the detection behavior by setting the environment variable APXS2 to the correct ‘apxs’ (or ‘apxs2’) binary, as provided by Apache.

Methods
Constants
RUBY = Config::CONFIG['bindir'] + '/' + Config::CONFIG['RUBY_INSTALL_NAME']
  The absolute path to the current Ruby interpreter.
GEM = determine_gem_command
  The correct ‘gem’ command for this Ruby interpreter.
APXS2 = find_apxs2
  The absolute path to the ‘apxs’ or ‘apxs2’ executable.
APACHE2_BINDIR = determine_apache2_bindir
  The absolute path to the Apache 2 ‘bin’ directory.
APACHE2_SBINDIR = determine_apache2_sbindir
  The absolute path to the Apache 2 ‘sbin’ directory.
APACHE2CTL = find_apache2ctl
  The absolute path to the ‘apachectl’ or ‘apache2ctl’ binary.
HTTPD = find_httpd
  The absolute path to the Apache binary (that is, ‘httpd’, ‘httpd2’, ‘apache’ or ‘apache2’).
APR_CONFIG = find_apr_config
  The absolute path to the ‘apr-config’ or ‘apr-1-config’ executable.
APXS2_FLAGS = determine_apxs2_flags
  The C compiler flags that are necessary to compile an Apache module.
APR_LIBS = determine_apr_info
MULTI_ARCH_FLAGS = determine_multi_arch_flags
  The C compiler flags that are necessary for building binaries in the same architecture(s) as Apache.
LIBEXT = determine_library_extension
  The current platform‘s shared library extension (‘so’ on most Unices).
LINUX_DISTRO = determine_linux_distro
  An identifier for the current Linux distribution. nil if the operating system is not Linux.
Public Class methods
find_command(name)

Check whether the specified command is in $PATH, and return its absolute filename. Returns nil if the command is not found.

This function exists because system(‘which’) doesn‘t always behave correctly, for some weird reason.

     # File lib/passenger/platform_info.rb, line 224
224:         def self.find_command(name)
225:                 ENV['PATH'].split(File::PATH_SEPARATOR).detect do |directory|
226:                         path = File.join(directory, name.to_s)
227:                         if File.executable?(path)
228:                                 return path
229:                         end
230:                 end
231:                 return nil
232:         end