Created
August 1, 2012 19:00
-
-
Save mysteriouspants/3229803 to your computer and use it in GitHub Desktop.
Extconf for therubyracer v0.10.1 or so
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mkmf' | |
require 'set' | |
begin | |
require 'libv8' | |
rescue LoadError | |
require 'rubygems' | |
require 'libv8' | |
end | |
have_library('objc') if RUBY_PLATFORM =~ /darwin/ | |
#we have to manually prepend the libv8 include path to INCFLAGS | |
#since find_header() does not actually work as advertized. | |
#see https://github.com/cowboyd/therubyracer/issues/91 | |
$INCFLAGS.insert 0, "-I#{Libv8.include_path} " | |
$CPPFLAGS += " -Wall" unless $CPPFLAGS.split.include? "-Wall" | |
$CPPFLAGS += " -g" unless $CPPFLAGS.split.include? "-g" | |
$CPPFLAGS += " -rdynamic" unless $CPPFLAGS.split.include? "-rdynamic" | |
$LDFLAGS.insert 0, "#{Libv8.library_path}/libv8.#{$LIBEXT} " | |
$LIBS << ' -lpthread' | |
CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/ | |
create_makefile('v8') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment