aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/config.m4.template
diff options
context:
space:
mode:
authorGravatar Stanley Cheung <stanleycheung@google.com>2016-02-13 00:03:02 -0800
committerGravatar Stanley Cheung <stanleycheung@google.com>2016-02-23 22:26:44 -0800
commit5adb71fb9add555ac161ebf745e5ac104fe3f847 (patch)
tree4c6748761c1fa6200756cca631d65bdfcb87fe7c /templates/config.m4.template
parentc95bfefa5ecd38fdbb8d3a14d425cf5cd7337fe6 (diff)
php: simplify installation
Diffstat (limited to 'templates/config.m4.template')
-rw-r--r--templates/config.m4.template30
1 files changed, 30 insertions, 0 deletions
diff --git a/templates/config.m4.template b/templates/config.m4.template
new file mode 100644
index 0000000000..1f8c1d9ca4
--- /dev/null
+++ b/templates/config.m4.template
@@ -0,0 +1,30 @@
+%YAML 1.2
+--- |
+ PHP_ARG_ENABLE(grpc, whether to enable grpc support,
+ [ --enable-grpc Enable grpc support])
+
+ if test "$PHP_GRPC" != "no"; then
+ dnl Write more examples of tests here...
+
+ dnl # --with-grpc -> add include path
+ PHP_ADD_INCLUDE(../../grpc/include)
+ PHP_ADD_INCLUDE(../../grpc/src/php/ext/grpc)
+ PHP_ADD_INCLUDE(../../grpc/third_party/boringssl/include)
+
+ PHP_ADD_LIBRARY(pthread)
+
+ PHP_NEW_EXTENSION(grpc,
+ % for source in php_config_m4.src:
+ ${source} ${"\\"}
+ % endfor
+ % for lib in libs:
+ % if lib.name in php_config_m4.get('deps', []):
+ % for source in lib.src:
+ ${source} ${"\\"}
+ % endfor
+ % endif
+ % endfor
+ , $ext_shared, , -Wall -Werror -std=c11 ${"\\"}
+ -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN ${"\\"}
+ -D_HAS_EXCEPTIONS=0 -DNOMINMAX)
+ fi