Sha256: 4990cf0686f973e796d9982fe606ca5a029ca5c1e88dda0330d992b0ddfd9718

Contents?: true

Size: 1.36 KB

Versions: 1

Compression:

Stored size: 1.36 KB

Contents

if RUBY_PLATFORM =~ /darwin/
  # do nothing on a mac, this is so people developing applications using this
  # gem on a mac (using stubs for development) can still keep the gem in their
  # Gemfile

  # create a blank Makefile to satisfy extension install requirements
  File.open("Makefile", "w") { |f| f << 'install:' }
else
  require 'mkmf'
  generate_sources_path = File.join(File.dirname(__FILE__), 'generate')
  $LOAD_PATH.unshift generate_sources_path
  require 'generate_reason'
  require 'generate_const'
  require 'generate_structs'

  include_path = ''
  if RUBY_PLATFORM =~ /win|mingw/i
    include_path = 'C:\Program Files\IBM\WebSphere MQ\tools\c\include'
    dir_config('mqm', include_path, '.')
  else
    include_path = '/opt/mqm/inc'
    lib64_path   = '/opt/mqm/lib64'
    lib_path     = File.directory?(lib64_path) ? lib64_path : '/opt/mqm/lib'
    dir_config('mqm', include_path, lib_path)
  end

  have_header('cmqc.h')

  # Check for WebSphere MQ Server library
  unless (RUBY_PLATFORM =~ /win/i) || (RUBY_PLATFORM =~ /solaris/i) || (RUBY_PLATFORM =~ /linux/i)
    have_library('mqm')
  end

  # Generate Source Files
  GenerateReason.generate(include_path+'/')
  GenerateConst.generate(include_path+'/', File.dirname(__FILE__) + '/../lib/wmq')
  GenerateStructs.new(include_path+'/', generate_sources_path).generate

  # Generate Makefile
  create_makefile('wmq/wmq')
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ferocia-rubywmq-2.0.4 ext/extconf.rb