зеркало из https://github.com/github/memcached.git
Explicitly set the arch on i386 Leopard.
This commit is contained in:
Родитель
e93ccf2093
Коммит
a0b05f141f
|
@ -6,25 +6,32 @@ if ENV['SWIG']
|
|||
$stdout.write `swig -I/opt/local/include -ruby -autorename rlibmemcached.i`
|
||||
end
|
||||
|
||||
if `uname -sp` == "Darwin i386\n"
|
||||
$CFLAGS.gsub! /-arch \S+/, ''
|
||||
$CFLAGS << " -arch i386"
|
||||
$LDFLAGS.gsub! /-arch \S+/, ''
|
||||
$LDFLAGS << " -arch i386"
|
||||
end
|
||||
|
||||
$CFLAGS.gsub! /-O\d/, ''
|
||||
|
||||
if ENV['DEBUG']
|
||||
puts "setting debug flags"
|
||||
$CFLAGS << " -O0 -ggdb -DHAVE_DEBUG"
|
||||
$CFLAGS << " -O0 -ggdb -DHAVE_DEBUG"
|
||||
else
|
||||
$CFLAGS << " -O3"
|
||||
end
|
||||
|
||||
find_library(*['memcached', 'memcached_server_add', dir_config('libmemcached').last].compact) or
|
||||
find_library(*['memcached', 'memcached_server_add_with_weight', dir_config('libmemcached').last].compact) or
|
||||
raise "shared library 'libmemcached' not found"
|
||||
|
||||
[
|
||||
[
|
||||
'libmemcached/memcached.h',
|
||||
'libmemcached/memcached_constants.h',
|
||||
'libmemcached/memcached_constants.h',
|
||||
'libmemcached/memcached_storage.h',
|
||||
'libmemcached/memcached_result.h',
|
||||
'libmemcached/memcached_server.h'
|
||||
].each do |header|
|
||||
].each do |header|
|
||||
find_header(*[header, dir_config('libmemcached').first].compact) or
|
||||
raise "header file '#{header}' not found"
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче