Skip to content

Commit

Permalink
clean up and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zenspider committed Oct 26, 2009
1 parent 919cfe4 commit c71ae05
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
5 changes: 1 addition & 4 deletions bin/phuby_server 100644 → 100755
Expand Up @@ -4,10 +4,7 @@ require 'rubygems'
require 'phuby'
require 'webrick'

s = WEBrick::HTTPServer.new(
:Port => 10101,
:DocumentRoot => ARGV[0]
)
s = WEBrick::HTTPServer.new(:Port => 10101, :DocumentRoot => ARGV[0])

s.mount('/', Phuby::PHPHandler)

Expand Down
13 changes: 8 additions & 5 deletions ext/phuby/extconf.rb
Expand Up @@ -4,18 +4,21 @@

require 'mkmf'

php_inc, php_lib = dir_config('php5', '/usr/local/include', '/usr/local/lib')
config = Dir["/{usr,opt}/local/bin/php-config"]
prefix = `#{config} --prefix`.chomp

$INCFLAGS = "-I#{File.join(php_inc, 'php')}".quote + " #{$INCFLAGS}"
php_inc, php_lib = dir_config("php5", "#{prefix}/include", "#{prefix}/lib")

$INCFLAGS = "-I#{File.join(php_inc, "php").quote} #{$INCFLAGS}"

%w{ Zend TSRM main }.each do |dir|
$INCFLAGS = "-I#{File.join(php_inc, 'php', dir)}".quote + " #{$INCFLAGS}"
$INCFLAGS = "-I#{File.join(php_inc, "php", dir).quote} #{$INCFLAGS}"
end

unless find_library('php5', 'php_embed_init', php_lib)
unless find_library("php5", "php_embed_init", php_lib)
abort "php is missing!"
end

create_makefile('phuby/phuby')
create_makefile("phuby/phuby")

# :startdoc:

0 comments on commit c71ae05

Please sign in to comment.