Sha256: 3716d78041e41ee2cfa2796ffd79c04cb12c44f0944f54835940c007be15b3a9

Contents?: true

Size: 1.52 KB

Versions: 8

Compression:

Stored size: 1.52 KB

Contents

require 'mkmf'
require 'libv8'

have_library('pthread')
have_library('objc') if RUBY_PLATFORM =~ /darwin/
$CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall"
$CPPFLAGS += " -g" unless $CPPFLAGS.split.include? "-g"
$CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic"
$CPPFLAGS += " -fPIC" unless $CPPFLAGS.split.include? "-rdynamic" or RUBY_PLATFORM =~ /darwin/
$CPPFLAGS += " -std=c++0x"
$CPPFLAGS += " -fpermissive"

$LDFLAGS.insert 0, " -stdlib=libstdc++ " if RUBY_PLATFORM =~ /darwin/

if ENV['CXX']
  puts "SETTING CXX"
  CONFIG['CXX'] = ENV['CXX']
end

CXX11_TEST = <<EOS
#if __cplusplus <= 199711L
#   error A compiler that supports at least C++11 is required in order to compile this project.
#endif
EOS

`echo "#{CXX11_TEST}" | #{CONFIG['CXX']} -std=c++0x -x c++ -E -`
unless $?.success?
  warn <<EOS


WARNING: C++11 support is required for compiling mini_racer. Please make sure
you are using a compiler that supports at least C++11. Examples of such
compilers are GCC 4.7+ and Clang 3.2+.

If you are using Travis, consider either migrating your bulid to Ubuntu Trusty or
installing GCC 4.8. See mini_racer's README.md for more information.


EOS
end

CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
if CONFIG['warnflags']
  CONFIG['warnflags'].gsub!('-Wdeclaration-after-statement', '')
  CONFIG['warnflags'].gsub!('-Wimplicit-function-declaration', '')
end

if enable_config('debug')
  CONFIG['debugflags'] << ' -ggdb3 -O0'
end

Libv8.configure_makefile

create_makefile 'mini_racer_extension'

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
mini_racer-0.1.9 ext/mini_racer_extension/extconf.rb
mini_racer-0.1.8 ext/mini_racer_extension/extconf.rb
mini_racer-0.1.7 ext/mini_racer_extension/extconf.rb
mini_racer-0.1.6 ext/mini_racer_extension/extconf.rb
mini_racer-0.1.5 ext/mini_racer_extension/extconf.rb
mini_racer-0.1.5.pre.0 ext/mini_racer_extension/extconf.rb
ruby_box-0.0.0.1 vendor/gems/mini_racer/ext/mini_racer_extension/extconf.rb
ruby_box-0.0.0 vendor/gems/mini_racer/ext/mini_racer_extension/extconf.rb