# class Object

### Constants

GLOB
LoadLibrary

### Public Instance Methods

add_ssl_defines(header) click to toggle source

    # File ext/mysql2/extconf.rb, line 14
    def add_ssl_defines(header)
      all_modes_found = %w(SSL_MODE_DISABLED SSL_MODE_PREFERRED SSL_MODE_REQUIRED SSL_MODE_VERIFY_CA SSL_MODE_VERIFY_IDENTITY).inject(true) do |m, ssl_mode|
        m && have_const(ssl_mode, header)
      end
      $CFLAGS << ' -DFULL_SSL_MODE_SUPPORT' if all_modes_found
      # if we only have ssl toggle (--ssl,--disable-ssl) from 5.7.3 to 5.7.10
      has_no_support = all_modes_found ? false : !have_const('MYSQL_OPT_SSL_ENFORCE', header)
      $CFLAGS << ' -DNO_SSL_MODE_SUPPORT' if has_no_support
    end

asplode(lib) click to toggle source

    # File ext/mysql2/extconf.rb, line 4
    def asplode(lib)
      if RUBY_PLATFORM =~ /mingw|mswin/
        abort "-----\n#{lib} is missing. Check your installation of MySQL or Connector/C, and try again.\n-----"
      elsif RUBY_PLATFORM =~ /darwin/
        abort "-----\n#{lib} is missing. You may need to 'brew install mysql' or 'port install mysql', and try again.\n-----"
      else
        abort "-----\n#{lib} is missing. You may need to 'apt-get install libmysqlclient-dev' or 'yum install mysql-devel', and try again.\n-----"
      end
    end