1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00
therubyracer/ext/v8/extconf.rb
Charles Lowell d2bfb0e228 Revert "don't add pthread if it's already there."
Apparently -lpthread needs to appear *after* -lv8. Who knew?

This reverts commit bd2f6996e9.
2011-10-06 14:47:44 -05:00

26 lines
742 B
Ruby
Executable file

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"
$DEFLIBPATH.unshift(Libv8.library_path)
$LIBS << ' -lv8 -lpthread'
CONFIG['LDSHARED'] = '$(CXX) -shared' unless RUBY_PLATFORM =~ /darwin/
create_makefile('v8')