Sha256: 2435206f00de44d953ad1a2e7a7ad6babc26e4a1aceae5dd9b3dfb7995c87a46

Contents?: true

Size: 1.34 KB

Versions: 3

Compression:

Stored size: 1.34 KB

Contents

require "rubygems" unless defined?(Gem)
require "mkmf"
$extout_prefix = '/numru'
alias __install_dirs install_dirs
def install_dirs
  dirs = __install_dirs
  dirs.assoc("RUBYARCHDIR")[1].sub!(/target_prefix/,'extout_prefix')
  dirs
end

if Gem.respond_to?(:find_files)
  require "rbconfig"
  so = RbConfig::CONFIG["DLEXT"]
  narray_include = File.expand_path(File.dirname(Gem.find_files("narray.h")[0]))
  narray_lib = File.expand_path(File.dirname(Gem.find_files("narray." + so)[0]))
else
  gem_home=(`gem environment GEM_HOME`).chomp
  narray_dir = Dir.glob("#{gem_home}/gems/narray-*").sort[-1]
  if narray_dir
    narray_include = narray_lib = narray_dir
  else
    narray_include = narray_lib = [ $sitearchdir, $vendorarchdir]
  end
end
dir_config('narray', narray_include, narray_lib)

if ( ! ( have_header("narray.h") && have_header("narray_config.h") ) ) then
print <<EOS
** configure error **  
   Header narray.h or narray_config.h is not found. If you have these files in 
   /narraydir/include, try the following:

   % ruby extconf.rb --with-narray-include=/narraydir/include

EOS
   exit(-1)
end

if /cygwin|mingw/ =~ RUBY_PLATFORM
  unless have_library("narray")
   print <<-EOS
   ** configure error **  
   libnarray.a is not found.
   % ruby extconf.rb --with-narray-lib=/narraydir/lib

   EOS
   exit(-1)
  end    
end

create_makefile("gphys_ext")

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gphys-1.4.3.2 extconf.rb
gphys-1.4.3.1 extconf.rb
gphys-1.4.3 extconf.rb