summaryrefslogtreecommitdiffhomepage
path: root/auto
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2019-08-22 21:33:54 +0300
committerAndrei Belov <defan@nginx.com>2019-08-22 21:33:54 +0300
commita07c4d30a64f781f93730576b5dced32422a9935 (patch)
tree06ebfaa66845a057b8069014c5379b2dcfc80861 /auto
parent8a579acddeae0c0106e15d82aa7220ac01deba84 (diff)
parentc47af243b0e805376c4ec908f21e07dc811b33f0 (diff)
downloadunit-a07c4d30a64f781f93730576b5dced32422a9935.tar.gz
unit-a07c4d30a64f781f93730576b5dced32422a9935.tar.bz2
Merged with the default branch.1.10.0-1
Diffstat (limited to 'auto')
-rw-r--r--auto/make24
-rw-r--r--auto/modules/go1
-rw-r--r--auto/modules/perl19
-rw-r--r--auto/sources5
4 files changed, 35 insertions, 14 deletions
diff --git a/auto/make b/auto/make
index 1eee2a78..44d0bdfc 100644
--- a/auto/make
+++ b/auto/make
@@ -57,6 +57,7 @@ $echo >> $NXT_MAKEFILE
$echo "NXT_LIB_UNIT_OBJS = \\" >> $NXT_MAKEFILE
$echo " $NXT_BUILD_DIR/src/nxt_lvlhsh.o \\" >> $NXT_MAKEFILE
$echo " $NXT_BUILD_DIR/src/nxt_murmur_hash.o \\" >> $NXT_MAKEFILE
+$echo " $NXT_BUILD_DIR/src/nxt_websocket.o \\" >> $NXT_MAKEFILE
for nxt_src in $NXT_LIB_UNIT_SRCS
do
@@ -108,7 +109,9 @@ END
# Object files.
for nxt_src in $NXT_LIB_SRCS $NXT_TEST_SRCS $NXT_LIB_UNIT_SRCS \
- src/test/nxt_unit_app_test.c
+ src/test/nxt_unit_app_test.c \
+ src/test/nxt_unit_websocket_chat.c \
+ src/test/nxt_unit_websocket_echo.c
do
nxt_obj=${nxt_src%.c}.o
nxt_dep=${nxt_src%.c}.dep
@@ -150,7 +153,8 @@ if [ $NXT_TESTS = YES ]; then
.PHONY: tests
tests: $NXT_BUILD_DIR/tests $NXT_BUILD_DIR/utf8_file_name_test \\
- $NXT_BUILD_DIR/unit_app_test
+ $NXT_BUILD_DIR/unit_app_test $NXT_BUILD_DIR/unit_websocket_chat \\
+ $NXT_BUILD_DIR/unit_websocket_echo
$NXT_BUILD_DIR/tests: \$(NXT_TEST_OBJS) \\
$NXT_BUILD_DIR/$NXT_LIB_STATIC
@@ -174,6 +178,22 @@ $NXT_BUILD_DIR/unit_app_test: $NXT_BUILD_DIR/src/test/nxt_unit_app_test.o \\
$NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \\
$NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
+$NXT_BUILD_DIR/unit_websocket_chat: \\
+ $NXT_BUILD_DIR/src/test/nxt_unit_websocket_chat.o \\
+ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
+ \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_websocket_chat \\
+ \$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_unit_websocket_chat.o \\
+ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \\
+ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
+
+$NXT_BUILD_DIR/unit_websocket_echo: \\
+ $NXT_BUILD_DIR/src/test/nxt_unit_websocket_echo.o \\
+ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC
+ \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_websocket_echo \\
+ \$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_unit_websocket_echo.o \\
+ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \\
+ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS
+
END
else
diff --git a/auto/modules/go b/auto/modules/go
index 62c3743f..51b5979d 100644
--- a/auto/modules/go
+++ b/auto/modules/go
@@ -107,6 +107,7 @@ ${NXT_GO}-install-src: ${NXT_VERSION_H}
install -d \$(DESTDIR)\$(NXT_GO_DST)/src/nginx/unit
install -p -m644 ./src/*.h ./build/*.h ./src/go/unit/* \
./src/nxt_unit.c ./src/nxt_lvlhsh.c ./src/nxt_murmur_hash.c \
+ ./src/nxt_websocket.c \
\$(DESTDIR)\$(NXT_GO_DST)/src/nginx/unit/
${NXT_GO}-install-build: ${NXT_GO}-install-src
diff --git a/auto/modules/perl b/auto/modules/perl
index bf6fe6f0..a4fd5437 100644
--- a/auto/modules/perl
+++ b/auto/modules/perl
@@ -14,14 +14,12 @@ for nxt_option; do
case "$nxt_option" in
--perl=*) NXT_PERL="$value" ;;
- --include=*) NXT_PERL_INCPATH="$value" ;;
--module=*) NXT_PERL_MODULE="$value" ;;
--help)
cat << END
--perl=FILE set perl executable, default: perl
- --include=DIRECTORY set directory path to perl headers
--module=NAME set unit perl module name
END
@@ -59,10 +57,9 @@ nxt_found=no
if /bin/sh -c "$NXT_PERL -MConfig -e 'print \"Perl version: \",
\$Config{version}, \"\\n\"'" >> $NXT_AUTOCONF_ERR 2>&1; then
- NXT_PERL_INCPATH=${NXT_PERL_INCPATH=`$NXT_PERL -MConfig -e 'print $Config{archlib}, "/CORE"'`}
- NXT_PERL_INCLUDE="-I ${NXT_PERL_INCPATH}"
-
- NXT_PERL_LDOPTS=`$NXT_PERL -MExtUtils::Embed -e ldopts`
+ NXT_PERL_CFLAGS=`$NXT_PERL -MExtUtils::Embed -e ccflags | sed -e 's/^ //;s/ $//'`
+ NXT_PERL_INCLUDE=`$NXT_PERL -MExtUtils::Embed -e perl_inc | sed -e 's/^ //;s/ $//'`
+ NXT_PERL_LDOPTS=`$NXT_PERL -MExtUtils::Embed -e ldopts | sed -e 's/^ //;s/ $//'`
if [ "$NXT_SYSTEM" = "Darwin" ]; then
# OS X system perl wants to link universal binaries
@@ -70,13 +67,11 @@ if /bin/sh -c "$NXT_PERL -MConfig -e 'print \"Perl version: \",
| sed -e 's/-arch i386//' -e 's/-arch x86_64//'`
fi
- NXT_PERL_LIBS="-L ${NXT_PERL_INCPATH} ${NXT_PERL_LDOPTS}"
-
nxt_feature="Perl"
nxt_feature_name=""
nxt_feature_run=no
nxt_feature_incs="${NXT_PERL_INCLUDE}"
- nxt_feature_libs="${NXT_PERL_LIBS}"
+ nxt_feature_libs="${NXT_PERL_LDOPTS}"
nxt_feature_test="
#define _GNU_SOURCE
#include <EXTERN.h>
@@ -123,7 +118,7 @@ nxt_feature="Perl version"
nxt_feature_name=""
nxt_feature_run=value
nxt_feature_incs="${NXT_PERL_INCLUDE}"
-nxt_feature_libs="${NXT_PERL_LIBS}"
+nxt_feature_libs="${NXT_PERL_LDOPTS}"
nxt_feature_test="
#define _GNU_SOURCE
#include <EXTERN.h>
@@ -171,7 +166,7 @@ for nxt_src in $NXT_PERL_MODULE_SRCS; do
$NXT_BUILD_DIR/$nxt_obj: $nxt_src
mkdir -p $NXT_BUILD_DIR/src/perl
- \$(CC) -c \$(CFLAGS) \$(NXT_INCS) $NXT_PERL_INCLUDE \\
+ \$(CC) -c \$(CFLAGS) $NXT_PERL_CFLAGS \$(NXT_INCS) $NXT_PERL_INCLUDE \\
$nxt_dep_flags \\
-o $NXT_BUILD_DIR/$nxt_obj $nxt_src
$nxt_dep_post
@@ -194,7 +189,7 @@ ${NXT_PERL_MODULE}: $NXT_BUILD_DIR/${NXT_PERL_MODULE}.unit.so
$NXT_BUILD_DIR/${NXT_PERL_MODULE}.unit.so: $nxt_objs
\$(NXT_MODULE_LINK) -o $NXT_BUILD_DIR/${NXT_PERL_MODULE}.unit.so \\
- $nxt_objs $NXT_PERL_LIBS $NXT_LD_OPT
+ $nxt_objs $NXT_PERL_LDOPTS $NXT_LD_OPT
install: ${NXT_PERL_MODULE}-install
diff --git a/auto/sources b/auto/sources
index 4c4fd742..8ac8fb19 100644
--- a/auto/sources
+++ b/auto/sources
@@ -86,6 +86,11 @@ NXT_LIB_SRCS=" \
src/nxt_application.c \
src/nxt_external.c \
src/nxt_port_hash.c \
+ src/nxt_sha1.c \
+ src/nxt_websocket.c \
+ src/nxt_websocket_accept.c \
+ src/nxt_http_websocket.c \
+ src/nxt_h1proto_websocket.c \
"
NXT_LIB_SRC0=" \