summaryrefslogtreecommitdiffhomepage
path: root/auto/modules
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2018-12-20 20:25:50 +0300
committerAndrei Belov <defan@nginx.com>2018-12-20 20:25:50 +0300
commit82e12d0cdeeb707ad4b1aef91c5e90b4347b0831 (patch)
tree19ef4cf3dea340fa365af022c76543f92d1e2e0a /auto/modules
parentb140ac29e5571e9abaafce006932f15d86b78803 (diff)
parent4195a29fabfe65f5a28baf2405c2077e2ba3c09a (diff)
downloadunit-82e12d0cdeeb707ad4b1aef91c5e90b4347b0831.tar.gz
unit-82e12d0cdeeb707ad4b1aef91c5e90b4347b0831.tar.bz2
Merged with the default branch.
Diffstat (limited to '')
-rw-r--r--auto/modules/nodejs18
-rw-r--r--auto/modules/php29
-rw-r--r--auto/modules/ruby25
3 files changed, 62 insertions, 10 deletions
diff --git a/auto/modules/nodejs b/auto/modules/nodejs
index 443ee9d5..e0208f5d 100644
--- a/auto/modules/nodejs
+++ b/auto/modules/nodejs
@@ -123,8 +123,10 @@ fi
NXT_NODE_TMP=${NXT_BUILD_DIR}/src/${NXT_NODE}/unit-http
NXT_NODE_TARBALL=${NXT_BUILD_DIR}/${NXT_NODE}-unit-http.tar.gz
-NXT_NODE_EXPORTS="export UNIT_SRC_PATH=${PWD}/src && \
- export UNIT_LIB_STATIC_PATH=${PWD}/${NXT_BUILD_DIR}/libunit.a"
+NXT_NODE_VERSION_FILE=${NXT_NODE_TMP}/version.h
+NXT_NODE_EXPORTS="export UNIT_SRC_PATH=${PWD}/src \
+ && export UNIT_BUILD_PATH=${PWD}/${NXT_BUILD_DIR} \
+ && export UNIT_LIB_STATIC_PATH=${PWD}/${NXT_BUILD_DIR}/libunit.a"
if [ -n "$NXT_NODE_LOCAL" ]; then
NXT_NODE_INSTALL=local-install
@@ -148,9 +150,15 @@ ${NXT_NODE}: ${NXT_NODE}-copy $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
${NXT_NODE_EXPORTS} && \\
cd ${NXT_NODE_TMP} && ${NXT_NODE_GYP} configure build clean
-${NXT_NODE}-copy:
+${NXT_NODE}-copy: ${NXT_NODE_VERSION_FILE}
mkdir -p ${NXT_BUILD_DIR}/src/
- cp -rp src/nodejs/ ${NXT_BUILD_DIR}/src/${NXT_NODE}
+ cp -rp src/nodejs/* ${NXT_BUILD_DIR}/src/${NXT_NODE}
+
+${NXT_NODE_VERSION_FILE}: src/nxt_main.h
+ mkdir -p ${NXT_NODE_TMP}
+ $echo -n '#define NXT_NODE_VERNUM ' > $NXT_NODE_VERSION_FILE
+ grep 'define NXT_VERNUM' src/nxt_main.h \\
+ | sed -e 's/[^0-9]//g' >> $NXT_NODE_VERSION_FILE
${NXT_NODE_TARBALL}: ${NXT_NODE}-copy
tar -zcvf ${NXT_NODE_TARBALL} -C ${NXT_NODE_TMP} .
@@ -161,7 +169,7 @@ install: ${NXT_NODE}-$NXT_NODE_INSTALL
${NXT_NODE}-install: ${NXT_NODE_TARBALL} \
$NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
${NXT_NODE_EXPORTS} && \\
- ${NXT_NPM} install -g ${PWD}/${NXT_NODE_TARBALL}
+ ${NXT_NPM} install -g --unsafe-perm ${PWD}/${NXT_NODE_TARBALL}
${NXT_NODE}-uninstall:
${NXT_NPM} uninstall -g unit-http
diff --git a/auto/modules/php b/auto/modules/php
index 762c1621..362bbc69 100644
--- a/auto/modules/php
+++ b/auto/modules/php
@@ -111,7 +111,7 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
#include <php_main.h>
int main() {
- php_request_startup();
+ php_module_startup(NULL, NULL, 0);
return 0;
}"
@@ -124,6 +124,30 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
exit 1;
fi
+ # Bug #71041 (https://bugs.php.net/bug.php?id=71041).
+
+ nxt_feature="PHP zend_signal_startup()"
+ nxt_feature_name=""
+ nxt_feature_run=no
+ nxt_feature_incs="${NXT_PHP_INCLUDE}"
+ nxt_feature_libs="${NXT_PHP_LIB} ${NXT_PHP_LDFLAGS}"
+ nxt_feature_test="
+ #include <php.h>
+ #include <php_main.h>
+
+ int main() {
+ zend_signal_startup();
+ return 0;
+ }"
+
+ . auto/feature
+
+ if [ $nxt_found = yes ]; then
+ NXT_ZEND_SIGNAL_STARTUP=1
+ else
+ NXT_ZEND_SIGNAL_STARTUP=0
+ fi
+
else
$echo
$echo $0: error: no PHP found.
@@ -181,6 +205,7 @@ for nxt_src in $NXT_PHP_MODULE_SRCS; do
$NXT_BUILD_DIR/$nxt_obj: $nxt_src
\$(CC) -c \$(CFLAGS) \$(NXT_INCS) $NXT_PHP_INCLUDE \\
+ -DNXT_ZEND_SIGNAL_STARTUP=$NXT_ZEND_SIGNAL_STARTUP \\
$nxt_dep_flags \\
-o $NXT_BUILD_DIR/$nxt_obj $nxt_src
$nxt_dep_post
@@ -191,7 +216,7 @@ END
done
-
+
cat << END >> $NXT_MAKEFILE
.PHONY: ${NXT_PHP_MODULE}
diff --git a/auto/modules/ruby b/auto/modules/ruby
index 05072353..7d379f2f 100644
--- a/auto/modules/ruby
+++ b/auto/modules/ruby
@@ -62,10 +62,9 @@ if /bin/sh -c "$NXT_RUBY -v" >> $NXT_AUTOCONF_ERR 2>&1; then
NXT_RUBY_LIBNAME=`$NXT_RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG["RUBY_SO_NAME"])'`
NXT_RUBY_LIBSCONF=`$NXT_RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG["LIBS"])'`
- NXT_RUBY_LIBPATH=`$NXT_RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG["libdir"])'`
- NXT_RUBY_LIBS="-L$NXT_RUBY_LIBPATH -Wl,-rpath,${NXT_RUBY_LIBPATH} -l$NXT_RUBY_LIBNAME $NXT_RUBY_LIBSCONF"
+ NXT_RUBY_LIBS="-l$NXT_RUBY_LIBNAME $NXT_RUBY_LIBSCONF"
- nxt_feature="Ruby"
+ nxt_feature="Ruby library"
nxt_feature_name=""
nxt_feature_run=no
nxt_feature_incs="${NXT_RUBY_INCPATH}"
@@ -80,6 +79,26 @@ if /bin/sh -c "$NXT_RUBY -v" >> $NXT_AUTOCONF_ERR 2>&1; then
. auto/feature
+ if [ $nxt_found = no ]; then
+ NXT_RUBY_LIBPATH=`$NXT_RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG["libdir"])'`
+ NXT_RUBY_LIBS="-L$NXT_RUBY_LIBPATH -Wl,-rpath,${NXT_RUBY_LIBPATH} $NXT_RUBY_LIBS"
+
+ nxt_feature="Ruby library in $NXT_RUBY_LIBPATH"
+ nxt_feature_name=""
+ nxt_feature_run=no
+ nxt_feature_incs="${NXT_RUBY_INCPATH}"
+ nxt_feature_libs="${NXT_RUBY_LIBS}"
+ nxt_feature_test="
+ #include <ruby.h>
+
+ int main() {
+ ruby_init();
+ return ruby_cleanup(0);
+ }"
+
+ . auto/feature
+ fi
+
else
$echo "checking for Ruby ... not found"
fi