require "mkmf"

begin
  require "rubygems"
  paths = Gem.find_files("narray.h").map{|d| File.dirname(d)}
rescue LoadError
  paths = []
end
paths += [$archdir, $sitearchdir, $vendorarchdir]
dir_config("narray")
find_header("narray.h", *paths)

dir_config("grib_api")
if have_header("grib_api.h") && have_library("grib_api")
  create_makefile("numru/grib")
end
