This commit is contained in:
Evan Weaver 2008-10-28 19:54:45 -07:00
Родитель 58e0d2e1a6
Коммит 8838a48e44
1 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -15,11 +15,8 @@ else
$CFLAGS << " -O3"
end
dir_config 'rlibmemcached'
# XXX There's probably a better way to do this
raise "shared library 'libmemcached' not found" unless
find_library('memcached', 'memcached_server_add', *ENV['LD_LIBRARY_PATH'].to_s.split(":"))
find_library(*['memcached', 'memcached_server_add', dir_config('libmemcached').last].compact) or
raise "shared library 'libmemcached' not found"
[
'libmemcached/memcached.h',
@ -27,9 +24,9 @@ raise "shared library 'libmemcached' not found" unless
'libmemcached/memcached_storage.h',
'libmemcached/memcached_result.h',
'libmemcached/memcached_server.h'
].each do |header|
raise "header file '#{header}' not found" unless
find_header(header, *ENV['INCLUDE_PATH'].to_s.split(":"))
].each do |header|
find_header(*[header, dir_config('libmemcached').first].compact) or
raise "header file '#{header}' not found"
end
create_makefile 'rlibmemcached'