ext/mpc/extconf.rb in ruby-mpc-0.0.6 vs ext/mpc/extconf.rb in ruby-mpc-0.0.7
- old
+ new
@@ -1,6 +1,7 @@
require 'mkmf'
+require "extconf_task/mkmf_utils"
i = 0
while i < ARGV.size
case ARGV[i]
when '--ldflags'
@@ -18,17 +19,8 @@
dir_config("mpfr")
dir_config("mpc")
dir_config("gmp")
if have_header('mpfr.h') && have_library('mpfr') && have_header('mpc.h') && have_library('mpc') && have_header('gmp.h') && have_library('gmp')
- ruby_mpfr_header_dir = nil
- begin
- require "rubygems"
- spec = Gem::Specification.find_by_name("ruby-mpfr")
- ruby_mpfr_header_dir = File.join(spec.full_gem_path, 'ext/mpfr')
- rescue LoadError
- end
- unless find_header("ruby_mpfr.h", ruby_mpfr_header_dir)
- header_not_found("ruby_mpfr.h")
- end
+ find_header_in_gem("ruby_mpfr.h", "ruby-mpfr")
create_makefile("mpc")
end