diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-06-23 19:20:08 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-06-23 19:20:08 +0300 |
commit | 5a43bd0bfd1eaa60dede7beb3206a53e8d008fa4 (patch) | |
tree | 1b5fed79ddee1a884e117c7710593a3dfe298d94 /auto/modules/php/conf | |
parent | fa6582d9ad581451c8406ec2022b5df23676d0bb (diff) | |
download | unit-5a43bd0bfd1eaa60dede7beb3206a53e8d008fa4.tar.gz unit-5a43bd0bfd1eaa60dede7beb3206a53e8d008fa4.tar.bz2 |
PHP app request processing.
Diffstat (limited to 'auto/modules/php/conf')
-rw-r--r-- | auto/modules/php/conf | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/auto/modules/php/conf b/auto/modules/php/conf new file mode 100644 index 00000000..9eef65fb --- /dev/null +++ b/auto/modules/php/conf @@ -0,0 +1,43 @@ + +# Copyright (C) Max Romanov +# Copyright (C) NGINX, Inc. + + +NXT_PHP_CONFIG="${NXT_PHP}-config" +NXT_PHP_VERSION="`${NXT_PHP_CONFIG} --version`" +NXT_PHP_INCLUDE="`${NXT_PHP_CONFIG} --includes`" +NXT_PHP_LIB="-lphp${NXT_PHP_VERSION%%.*}" +NXT_PHP_LIBS="`${NXT_PHP_CONFIG} --ldflags`" + +nxt_feature="PHP" +nxt_feature_name=NXT_HAVE_PHP +nxt_feature_run=no +nxt_feature_incs="${NXT_PHP_INCLUDE}" +nxt_feature_libs="${NXT_PHP_LIB} ${NXT_PHP_LIBS}" +nxt_feature_test="#include <php.h> + #include <php_main.h> + + int main() { + php_request_startup(); + return 0; + }" + +. auto/feature + +if [ $nxt_found = no ]; then + $echo + $echo $0: error: no php found. + $echo + exit 1; +fi + +$echo " + php version: ${NXT_PHP_VERSION}" + +NXT_PHP_MODULE_SRCS=" \ + src/nxt_php_sapi.c \ +" + +NXT_MODULES_INIT="$NXT_MODULES_INIT nxt_php_sapi_init" +NXT_MODULES_SRCS="$NXT_MODULES_SRCS $NXT_PHP_MODULE_SRCS" + +NXT_LIB_AUX_LIBS="$NXT_LIB_AUX_LIBS $NXT_PHP_LIB $NXT_PHP_LIBS" |