More portable INCLUDE_PATH usage.

This commit is contained in:
Evan Weaver 2009-04-10 16:27:29 -04:00
Родитель 4bac99037d
Коммит c5ee450414
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -1,11 +1,17 @@
require 'mkmf'
INCLUDES = ENV['INCLUDE_PATH'].split(':').map{|s| " -I#{s}"}.uniq.join
if ENV['SWIG']
puts "running SWIG"
$stdout.write `swig -I/opt/local/include -ruby -autorename rlibmemcached.i`
cmd = "swig #{INCLUDES} -ruby -autorename rlibmemcached.i"
puts cmd
$stdout.write `#{cmd}`
end
$CFLAGS << INCLUDES
if `uname -sp` == "Darwin i386\n"
$CFLAGS.gsub! /-arch \S+/, ''
$CFLAGS << " -arch i386"