Sha256: 858b428b2ea7b13ce00a7ddb9259d264056bd4c854c2d7d741a86d2114eec373

Contents?: true

Size: 649 Bytes

Versions: 4

Compression:

Stored size: 649 Bytes

Contents

# Generates a makefile for buiding the extension.
#--
# Copyright 2006-2007 Suraj N. Kurapati
# See the file named LICENSE for details.

require 'mkmf'

# check for POSIX threads library
  hasPthread = have_library('pthread', 'pthread_create')

# check for ruby library
  require 'rbconfig'

  rubyLibArgs = Config::CONFIG.values.grep(/^-lruby/)

  rubyLibNames = rubyLibArgs.map {|a| a.sub /^-l/, ''}
  rubyLibNames.unshift 'ruby' # try most common name first
  rubyLibNames.uniq!

  hasRuby = rubyLibNames.inject(false) do |verdict, name|
    verdict ||= have_library(name, 'ruby_init')
  end

hasPthread && hasRuby && create_makefile('ruby-vpi')

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-vpi-16.0.0 ext/extconf.rb
ruby-vpi-16.0.1 ext/extconf.rb
ruby-vpi-17.0.0 ext/extconf.rb
ruby-vpi-18.0.0 ext/extconf.rb