summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2014-05-05 22:36:36 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2014-05-05 22:36:36 -0700
commitd2de4557234ddf3dd11e658109c0c224f25fe4e3 (patch)
treea3abc8e77398b9d0ae9439ca9bc7db4a8adb9d75 /ext
parent347622323ffba3c884d45590b3e831ae7e31d547 (diff)
downloadffi-yajl-d2de4557234ddf3dd11e658109c0c224f25fe4e3.tar.gz
removing libyajl2 to the separate gem
Diffstat (limited to 'ext')
-rw-r--r--ext/libyajl2/extconf.rb60
m---------ext/libyajl2/vendored0
2 files changed, 0 insertions, 60 deletions
diff --git a/ext/libyajl2/extconf.rb b/ext/libyajl2/extconf.rb
deleted file mode 100644
index ee8e30a..0000000
--- a/ext/libyajl2/extconf.rb
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'rbconfig'
-
-cflags = ENV['CFLAGS']
-ldflags = ENV['LDFLAGS']
-cc = ENV['CC']
-
-# use the CC that ruby was compiled with by default
-cc ||= RbConfig::MAKEFILE_CONFIG['CC']
-cflags ||= ""
-ldflags ||= ""
-
-# then ultimately default back to gcc
-cc ||= "gcc"
-
-# FIXME: add more compilers with default options
-if cc =~ /gcc|clang/
- cflags << " -O3" unless cflags =~ /-O\d/
- cflags << " -Wall"
-end
-
-if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
- require 'mkmf'
-
- # yajl_complete_parse is only in >= 2.0
- libyajl2_ok = have_library("yajl", "yajl_complete_parse", [ "yajl/yajl_parse.h" ]) && have_func("yajl_complete_parse")
-else
- # always install libyajl2 on Jruby
- # FIXME: get the conditional mkmf stuff to work on Jruby
- libyajl2_ok = false
-end
-
-prefix=File.expand_path(File.join(File.dirname(__FILE__), "..", ".."))
-
-#dir_config 'libyajl2'
-
-if libyajl2_ok
- File.open("Makefile", "w") do |mf|
- mf.puts "# Dummy makefile when we don't build the library"
- mf.puts "all install::\n"
- end
-else
- ENV['CFLAGS'] = cflags
- ENV['LDFLAGS'] = ldflags
- ENV['CC'] = cc
- system("cp -rf #{File.expand_path(File.join(File.dirname(__FILE__), "vendored"))} .") unless File.exists?("vendored")
-
- File.open("Makefile", "w") do |mf|
- mf.puts "# Makefile for building vendored libyajl2"
- mf.puts "CFLAGS = #{ENV['CFLAGS']}"
- mf.puts "LDFLAGS = #{ENV['LDFLAGS']}"
- mf.puts "CC = #{ENV['CC']}\n"
- mf.puts "all install::"
- mf.puts "\tcd vendored && ./configure --prefix=#{prefix}"
- mf.puts "\tcd vendored && make install"
- mf.puts "\tcp -f vendored/build/yajl-2.0.5/lib/libyajl.so .\n"
- end
-end
-
diff --git a/ext/libyajl2/vendored b/ext/libyajl2/vendored
deleted file mode 160000
-Subproject 4c539cb5b48c41cecbbf3a0afcbd293de33abfc