Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php extension: do not link rt in osx #2222

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions src/php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,27 @@ This directory contains source code for PHP implementation of gRPC layered on sh

#Status

Pre-Alpha : This gRPC PHP implementation is work-in-progress and is not expected to work yet.
Alpha : Ready for early adopters

## ENVIRONMENT

Prerequisite: PHP 5.5 or later, PHPUnit, pecl
Prerequisite: PHP 5.5 or later, `phpunit`, `pecl`

Linux:

```sh
$ sudo apt-get install php5 php5-dev phpunit php-pear
```

OS X:

```sh
sudo apt-get install php5 php5-dev phpunit php-pear
$ curl https://phar.phpunit.de/phpunit.phar -o phpunit.phar
$ chmod +x phpunit.phar
$ sudo mv phpunit.phar /usr/local/bin/phpunit

$ curl -O http://pear.php.net/go-pear.phar
$ sudo php -d detect_unicode=0 go-pear.phar
```

## Build from Homebrew
Expand Down Expand Up @@ -71,8 +84,8 @@ $ make
$ sudo make install
```

In your php.ini file, add the line `extension=grpc.so` to load the extension
at PHP startup.
(Optional) In your php.ini file, add the line `extension=grpc.so` to load
the extension at PHP startup.

Install Composer

Expand Down
9 changes: 7 additions & 2 deletions src/php/ext/grpc/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,13 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_LIBRARY(dl,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(dl)

PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt)
case $host in
*darwin*) ;;
*)
PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt)
;;
esac

GRPC_LIBDIR=$GRPC_DIR/${GRPC_LIB_SUBDIR-lib}

Expand Down