Sha256: 1ed340f58ebcf99e16c0a84761ef12588f012989ee2384c689718b33f44fe65c

Contents?: true

Size: 1.05 KB

Versions: 5

Compression:

Stored size: 1.05 KB

Contents

ENV["RC_ARCHS"] = "" if RUBY_PLATFORM =~ /darwin/

require "find"
require "mkmf"

cflags  = %w(g)
defines = %w(XP_UNIX)

warnings  = %w(all extra cast-qual write-strings conversion missing-noreturn)
warnings << "inline"

cflags.concat warnings.collect { |w| "W#{w}" }
cflags.concat defines.collect  { |d| "D#{d}" }

$CFLAGS << cflags.collect { |f| " -#{f}" }.join(" ")

tracemonkey_dir = File.expand_path File.dirname(__FILE__) +
  "/../../vendor/tracemonkey"

Dir.chdir tracemonkey_dir do
  system "autoconf213" or
    system "autoconf-2.13" or 
    raise "could not run autoconf" if Dir["configure"].empty?
  system "./configure --enable-static" or raise "could not run configure" if Dir["Makefile"].empty?
  system "make" or raise "could not make tracemonkey" if Dir["**/libjs_static.a"].empty?
end

libjs = Dir[tracemonkey_dir + "/**/libjs_static.a"].first
$LOCAL_LIBS << libjs
$LIBS += " -lstdc++ "

dir_config "johnson/tracemonkey"

find_header "jsautocfg.h", File.dirname(libjs)
find_header "jsapi.h", tracemonkey_dir

create_makefile "johnson/tracemonkey/tracemonkey"

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
johnson-2.0.0.pre0 ext/tracemonkey/extconf.rb
smparkes-johnson-1.1.2.6 ext/tracemonkey/extconf.rb
smparkes-johnson-1.1.2.5 ext/tracemonkey/extconf.rb
smparkes-johnson-1.1.2.4 ext/tracemonkey/extconf.rb
smparkes-johnson-1.1.2.3 ext/tracemonkey/extconf.rb