Sha256: 15d5bb620f5cb8ed62845cbc4c3979a299cb758d60cfaa10c586a13e609e8ca6

Contents?: true

Size: 822 Bytes

Versions: 4

Compression:

Stored size: 822 Bytes

Contents

# frozen_string_literal: true

require 'mkmf'
require 'numo/narray'

$LOAD_PATH.each do |lp|
  if File.exist?(File.join(lp, 'numo/numo/narray.h'))
    $INCFLAGS = "-I#{lp}/numo #{$INCFLAGS}"
    break
  end
end

abort 'numo/narray.h not found.' unless have_header('numo/narray.h')

if RUBY_PLATFORM =~ /mswin|cygwin|mingw/
  $LOAD_PATH.each do |lp|
    if File.exist?(File.join(lp, 'numo/libnarray.a'))
      $LDFLAGS = "-L#{lp}/numo #{$LDFLAGS}"
      break
    end
  end

  abort 'libnarray.a not found.' unless have_library('narray', 'nary_new')
end

if RUBY_PLATFORM.match?(/darwin/) && Gem::Version.new('3.1.0') <= Gem::Version.new(RUBY_VERSION)
  if try_link('int main(void){return 0;}', '-Wl,-undefined,dynamic_lookup')
    $LDFLAGS << ' -Wl,-undefined,dynamic_lookup'
  end
end

create_makefile('rumale/tree/ext')

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rumale-tree-0.27.0 ext/rumale/tree/extconf.rb
rumale-tree-0.26.0 ext/rumale/tree/extconf.rb
rumale-tree-0.25.0 ext/rumale/tree/extconf.rb
rumale-tree-0.24.0 ext/rumale/tree/extconf.rb