зеркало из https://github.com/github/memcached.git
Fix build problem.
This commit is contained in:
Родитель
4ac7c15abd
Коммит
13fc738f2f
|
@ -1,4 +1,6 @@
|
|||
|
||||
v0.15.1. Fix build problem.
|
||||
|
||||
v0.15. Update to libmemcached 0.31.1. UDP support. Domain socket support (hellvinz). Bugfixes. Bundle libmemcached itself with the gem (antifuchs).
|
||||
|
||||
v0.14.4. Re-SWIG.
|
||||
|
|
|
@ -5,10 +5,10 @@ HERE = File.expand_path(File.dirname(__FILE__))
|
|||
BUNDLE = Dir.glob("libmemcached-*.tar.gz").first
|
||||
BUNDLE_PATH = BUNDLE.sub(".tar.gz", "")
|
||||
|
||||
$includes = ENV['INCLUDE_PATH'].to_s.split(':').map{|s| " -I#{s}"}.uniq.join
|
||||
$LIBS << " -lmemcached"
|
||||
|
||||
if !ENV["EXTERNAL_LIB"]
|
||||
$includes = " -I#{HERE}/include" + $includes
|
||||
$includes = " -I#{HERE}/include"
|
||||
$libraries = " -L#{HERE}/lib"
|
||||
|
||||
$CFLAGS = "#{$includes} #{$libraries} #{$CFLAGS}"
|
||||
|
@ -35,6 +35,8 @@ if !ENV["EXTERNAL_LIB"]
|
|||
system("rm -rf #{BUNDLE_PATH}")
|
||||
end
|
||||
end
|
||||
|
||||
find_header('libmemcached/memcached.h', "#{HERE}/include") or raise
|
||||
end
|
||||
|
||||
if ENV['SWIG']
|
||||
|
|
|
@ -22,7 +22,7 @@ class Memcached
|
|||
Lib = Rlibmemcached
|
||||
REQUIRED_VERSION = File.read("#{File.dirname(__FILE__)}/../COMPATIBILITY")[/:: ([\d\.]+)/, 1]
|
||||
RECEIVED_VERSION = Lib.memcached_lib_version
|
||||
STDERR.puts "Warning: libmemcached #{REQUIRED_VERSION} suggested; you have #{RECEIVED_VERSION}." unless REQUIRED_VERSION == RECEIVED_VERSION
|
||||
raise "libmemcached #{REQUIRED_VERSION} required; your gem is linked to #{RECEIVED_VERSION}." unless REQUIRED_VERSION == RECEIVED_VERSION
|
||||
end
|
||||
|
||||
require 'memcached/integer'
|
||||
|
|
Загрузка…
Ссылка в новой задаче