Sha256: ae3a72f920863e336c1022874f6873fc6ae71e1e5d9e8a3b0383b65da80db41b
Contents?: true
Size: 812 Bytes
Versions: 1
Compression:
Stored size: 812 Bytes
Contents
require 'mkmf' # Compile the embedded snappy- lib vendor_dir = File.join(File.dirname(__FILE__)), "vendor" snappy_dir = Dir[File.join(vendor_dir, "snappy-*")].first old_pwd = Dir.pwd begin Dir.chdir(snappy_dir) fork { exec("./configure") }; Process.wait; exit(1) unless $?.success? fork { exec("make") }; Process.wait; exit(1) unless $?.success? ensure Dir.chdir(old_pwd) end have_header("ruby/st.h") || have_header("st.h") # Pull in Snappy includes $INCFLAGS << " -I#{snappy_dir}" # Link with the Snappy object files Dir["#{snappy_dir}/.libs/*.o"].each { |o| $LOCAL_LIBS << " #{o}" } # Ensure we're linked with CXX, or it all breaks, due to libstdc++ and such #CONFIG['LDSHARED'] = '$(CXX) -dynamiclib' have_library("stdc++") dir_config('snappy') create_makefile('snappy_ext')
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
snappy_ext-0.1.2 | ext/snappy/extconf.rb |