Sha256: f843872879bf740ed4fd7baa7d4c5380d0345aa4d104cedec8d79c1256994cdf
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 KB
Contents
#!/usr/bin/env ruby require 'mkmf' # Workaround for Ruby bug #8074, introduced in Ruby 2.0.0, fixed in Ruby 2.1.0 # https://bugs.ruby-lang.org/issues/8074 @libdir_basename = "lib" dir_config('gmp') dir_config('mpfr') use_if_mpfr = ! ARGV.include?('--no-mpfr') ok = true unless have_header('gmp.h') $stderr.puts "can't find gmp.h, try --with-gmp-include=<path>" ok = false end unless have_library('gmp', '__gmpz_init') $stderr.puts "can't find -lgmp, try --with-gmp-lib=<path>" ok = false end if use_if_mpfr if (have_header('mpfr.h') and have_header('mpf2mpfr.h') and have_library('mpfr', 'mpfr_init')) $CFLAGS += ' -DMPFR' end end unless have_macro('SIZEOF_INTPTR_T') check_sizeof('intptr_t', 'ruby.h') end # Need check for which ruby vm to see how to require various things if (begin; Rubinius; rescue NameError; end) != nil $CFLAGS += ' -DRUBY_ENGINE_RBX' end if (begin; JRuby; rescue NameError; end) != nil $CFLAGS += ' -DRUBY_ENGINE_JRUBY' end if try_compile('', '-O6') $CFLAGS += ' -Wall -W -O6 -g' else $CFLAGS += ' -Wall -W -O3 -g' end if ok create_makefile('gmp') else raise "Unable to build, correct above errors and rerun" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gmp-0.6.47 | ext/extconf.rb |
gmp-0.6.43 | ext/extconf.rb |