aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xsrc/php/ext/grpc/config.m412
-rwxr-xr-xtools/run_tests/build_php.sh21
2 files changed, 30 insertions, 3 deletions
diff --git a/src/php/ext/grpc/config.m4 b/src/php/ext/grpc/config.m4
index d7d13f413e..f8f15ce968 100755
--- a/src/php/ext/grpc/config.m4
+++ b/src/php/ext/grpc/config.m4
@@ -38,7 +38,13 @@ if test "$PHP_GRPC" != "no"; then
PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt)
- PHP_ADD_LIBPATH($GRPC_DIR/lib)
+ if test -e $GRPC_DIR/libs/opt; then
+ GRPC_LIBDIR=$GRPC_DIR/libs/opt
+ else
+ GRPC_LIBDIR=$GRPC_DIR/lib
+ fi
+
+ PHP_ADD_LIBPATH($GRPC_LIBDIR)
PHP_CHECK_LIBRARY(gpr,gpr_now,
[
@@ -48,7 +54,7 @@ if test "$PHP_GRPC" != "no"; then
],[
AC_MSG_ERROR([wrong gpr lib version or lib not found])
],[
- -L$GRPC_DIR/lib
+ -L$GRPC_LIBDIR
])
PHP_ADD_LIBRARY(event,,GRPC_SHARED_LIBADD)
@@ -68,7 +74,7 @@ if test "$PHP_GRPC" != "no"; then
],[
AC_MSG_ERROR([wrong grpc lib version or lib not found])
],[
- -L$GRPC_DIR/lib
+ -L$GRPC_LIBDIR
])
PHP_SUBST(GRPC_SHARED_LIBADD)
diff --git a/tools/run_tests/build_php.sh b/tools/run_tests/build_php.sh
index a9bf588e2f..996ddce29b 100755
--- a/tools/run_tests/build_php.sh
+++ b/tools/run_tests/build_php.sh
@@ -1 +1,22 @@
#!/bin/bash
+
+set -ex
+
+# change to grpc repo root
+cd $(dirname $0)/../..
+
+export GRPC_DIR=`pwd`
+
+# make the libraries
+make -j shared_c
+
+# build php
+cd src/php
+
+cd ext/grpc
+phpize
+cd ../..
+ext/grpc/configure
+#cd ext/grpc
+make
+