Better GRPC_LIBDIR config
diff --git a/src/php/ext/grpc/config.m4 b/src/php/ext/grpc/config.m4
index 7652ca7..27c6778 100755
--- a/src/php/ext/grpc/config.m4
+++ b/src/php/ext/grpc/config.m4
@@ -38,11 +38,7 @@
PHP_ADD_LIBRARY(rt,,GRPC_SHARED_LIBADD)
PHP_ADD_LIBRARY(rt)
- if test -e $GRPC_DIR/libs/opt; then
- GRPC_LIBDIR=$GRPC_DIR/libs/opt
- else
- GRPC_LIBDIR=$GRPC_DIR/lib
- fi
+ GRPC_LIBDIR=$GRPC_DIR/${GRPC_LIB_SUBDIR-lib}
PHP_ADD_LIBPATH($GRPC_LIBDIR)
diff --git a/tools/run_tests/build_php.sh b/tools/run_tests/build_php.sh
index de89974..6841656 100755
--- a/tools/run_tests/build_php.sh
+++ b/tools/run_tests/build_php.sh
@@ -6,6 +6,7 @@
cd $(dirname $0)/../..
root=`pwd`
+export GRPC_LIB_SUBDIR=libs/opt
# make the libraries
make -j static_c