2004-07-26 02:34:14 +08:00
|
|
|
|
2004-09-30 00:00:49 +08:00
|
|
|
# Copyright (C) Igor Sysoev
|
2012-01-18 23:07:43 +08:00
|
|
|
# Copyright (C) Nginx, Inc.
|
2004-09-30 00:00:49 +08:00
|
|
|
|
|
|
|
|
2004-07-26 02:34:14 +08:00
|
|
|
if [ $OPENSSL != NONE ]; then
|
|
|
|
|
2021-09-27 15:10:38 +08:00
|
|
|
have=NGX_OPENSSL . auto/have
|
|
|
|
have=NGX_SSL . auto/have
|
|
|
|
|
|
|
|
if [ $USE_OPENSSL_QUIC = YES ]; then
|
|
|
|
have=NGX_QUIC . auto/have
|
2023-02-22 23:16:53 +08:00
|
|
|
have=NGX_QUIC_OPENSSL_COMPAT . auto/have
|
2021-09-27 15:10:38 +08:00
|
|
|
fi
|
|
|
|
|
2004-07-26 02:34:14 +08:00
|
|
|
case "$CC" in
|
2009-04-16 03:46:24 +08:00
|
|
|
|
2009-05-14 23:46:34 +08:00
|
|
|
cl | bcc32)
|
|
|
|
CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
|
2009-04-16 03:46:24 +08:00
|
|
|
|
2009-05-14 23:46:34 +08:00
|
|
|
CORE_INCS="$CORE_INCS $OPENSSL/openssl/include"
|
|
|
|
CORE_DEPS="$CORE_DEPS $OPENSSL/openssl/include/openssl/ssl.h"
|
2016-12-24 23:01:14 +08:00
|
|
|
|
|
|
|
if [ -f $OPENSSL/ms/do_ms.bat ]; then
|
|
|
|
# before OpenSSL 1.1.0
|
|
|
|
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/ssleay32.lib"
|
|
|
|
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/libeay32.lib"
|
|
|
|
else
|
|
|
|
# OpenSSL 1.1.0+
|
|
|
|
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/libssl.lib"
|
|
|
|
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/libcrypto.lib"
|
|
|
|
fi
|
2009-04-16 03:46:24 +08:00
|
|
|
|
2009-04-21 22:31:40 +08:00
|
|
|
# libeay32.lib requires gdi32.lib
|
|
|
|
CORE_LIBS="$CORE_LIBS gdi32.lib"
|
2010-04-01 23:18:29 +08:00
|
|
|
# OpenSSL 1.0.0 requires crypt32.lib
|
|
|
|
CORE_LIBS="$CORE_LIBS crypt32.lib"
|
2009-04-16 03:46:24 +08:00
|
|
|
;;
|
|
|
|
|
2004-07-26 02:34:14 +08:00
|
|
|
*)
|
2009-09-28 20:24:09 +08:00
|
|
|
CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
|
|
|
|
CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
|
|
|
|
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
|
|
|
|
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
|
2016-02-18 16:39:57 +08:00
|
|
|
CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
|
2018-03-22 20:55:57 +08:00
|
|
|
CORE_LIBS="$CORE_LIBS $NGX_LIBPTHREAD"
|
2013-09-05 00:48:28 +08:00
|
|
|
|
|
|
|
if [ "$NGX_PLATFORM" = win32 ]; then
|
|
|
|
CORE_LIBS="$CORE_LIBS -lgdi32 -lcrypt32 -lws2_32"
|
|
|
|
fi
|
nginx-0.1.14-RELEASE import
*) Feature: the autoconfiguration directives:
--http-client-body-temp-path=PATH, --http-proxy-temp-path=PATH, and
--http-fastcgi-temp-path=PATH
*) Change: the directory name for the temporary files with the client
request body is specified by directive client_body_temp_path, by
default it is <prefix>/client_body_temp.
*) Feature: the ngx_http_fastcgi_module and the directives:
fastcgi_pass, fastcgi_root, fastcgi_index, fastcgi_params,
fastcgi_connect_timeout, fastcgi_send_timeout, fastcgi_read_timeout,
fastcgi_send_lowat, fastcgi_header_buffer_size, fastcgi_buffers,
fastcgi_busy_buffers_size, fastcgi_temp_path,
fastcgi_max_temp_file_size, fastcgi_temp_file_write_size,
fastcgi_next_upstream, and fastcgi_x_powered_by.
*) Bugfix: the "[alert] zero size buf" error; the bug had appeared in
0.1.3.
*) Change: the URI must be specified after the host name in the
proxy_pass directive.
*) Change: the %3F symbol in the URI was considered as the argument
string start.
*) Feature: the unix domain sockets support in the
ngx_http_proxy_module.
*) Feature: the ssl_engine and ssl_ciphers directives.
Thanks to Sergey Skvortsov for SSL-accelerator.
2005-01-18 21:03:58 +08:00
|
|
|
;;
|
2004-07-26 02:34:14 +08:00
|
|
|
esac
|
|
|
|
|
|
|
|
else
|
|
|
|
|
2010-07-08 23:51:47 +08:00
|
|
|
if [ "$NGX_PLATFORM" != win32 ]; then
|
2005-12-05 21:18:09 +08:00
|
|
|
|
2010-07-08 23:51:47 +08:00
|
|
|
OPENSSL=NO
|
2005-12-05 21:18:09 +08:00
|
|
|
|
2010-07-08 23:51:47 +08:00
|
|
|
ngx_feature="OpenSSL library"
|
|
|
|
ngx_feature_name="NGX_OPENSSL"
|
|
|
|
ngx_feature_run=no
|
|
|
|
ngx_feature_incs="#include <openssl/ssl.h>"
|
|
|
|
ngx_feature_path=
|
2018-03-22 20:55:57 +08:00
|
|
|
ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD"
|
2016-04-01 04:38:33 +08:00
|
|
|
ngx_feature_test="SSL_CTX_set_options(NULL, 0)"
|
2010-07-08 23:51:47 +08:00
|
|
|
. auto/feature
|
2005-12-05 21:18:09 +08:00
|
|
|
|
2015-06-10 17:25:45 +08:00
|
|
|
if [ $ngx_found = no ]; then
|
|
|
|
|
|
|
|
# FreeBSD port
|
|
|
|
|
|
|
|
ngx_feature="OpenSSL library in /usr/local/"
|
|
|
|
ngx_feature_path="/usr/local/include"
|
|
|
|
|
|
|
|
if [ $NGX_RPATH = YES ]; then
|
2018-03-22 20:55:57 +08:00
|
|
|
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lssl -lcrypto"
|
2015-06-10 17:25:45 +08:00
|
|
|
else
|
2018-03-22 20:55:57 +08:00
|
|
|
ngx_feature_libs="-L/usr/local/lib -lssl -lcrypto"
|
2015-06-10 17:25:45 +08:00
|
|
|
fi
|
|
|
|
|
2018-03-22 20:55:57 +08:00
|
|
|
ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
|
|
|
|
|
2015-06-10 17:25:45 +08:00
|
|
|
. auto/feature
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $ngx_found = no ]; then
|
|
|
|
|
|
|
|
# NetBSD port
|
|
|
|
|
|
|
|
ngx_feature="OpenSSL library in /usr/pkg/"
|
|
|
|
ngx_feature_path="/usr/pkg/include"
|
|
|
|
|
|
|
|
if [ $NGX_RPATH = YES ]; then
|
2018-03-22 20:55:57 +08:00
|
|
|
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lssl -lcrypto"
|
2015-06-10 17:25:45 +08:00
|
|
|
else
|
2018-03-22 20:55:57 +08:00
|
|
|
ngx_feature_libs="-L/usr/pkg/lib -lssl -lcrypto"
|
2015-06-10 17:25:45 +08:00
|
|
|
fi
|
|
|
|
|
2018-03-22 20:55:57 +08:00
|
|
|
ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
|
|
|
|
|
2015-06-10 17:25:45 +08:00
|
|
|
. auto/feature
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $ngx_found = no ]; then
|
|
|
|
|
|
|
|
# MacPorts
|
|
|
|
|
|
|
|
ngx_feature="OpenSSL library in /opt/local/"
|
|
|
|
ngx_feature_path="/opt/local/include"
|
|
|
|
|
|
|
|
if [ $NGX_RPATH = YES ]; then
|
2018-03-22 20:55:57 +08:00
|
|
|
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lssl -lcrypto"
|
2015-06-10 17:25:45 +08:00
|
|
|
else
|
2018-03-22 20:55:57 +08:00
|
|
|
ngx_feature_libs="-L/opt/local/lib -lssl -lcrypto"
|
2015-06-10 17:25:45 +08:00
|
|
|
fi
|
|
|
|
|
2018-03-22 20:55:57 +08:00
|
|
|
ngx_feature_libs="$ngx_feature_libs $NGX_LIBDL $NGX_LIBPTHREAD"
|
|
|
|
|
2015-06-10 17:25:45 +08:00
|
|
|
. auto/feature
|
|
|
|
fi
|
|
|
|
|
2010-07-08 23:51:47 +08:00
|
|
|
if [ $ngx_found = yes ]; then
|
|
|
|
have=NGX_SSL . auto/have
|
2015-11-24 03:48:31 +08:00
|
|
|
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
2016-02-04 23:30:21 +08:00
|
|
|
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
2010-07-08 23:51:47 +08:00
|
|
|
OPENSSL=YES
|
2023-02-22 23:16:53 +08:00
|
|
|
|
|
|
|
if [ $USE_OPENSSL_QUIC = YES ]; then
|
|
|
|
|
|
|
|
ngx_feature="OpenSSL QUIC support"
|
|
|
|
ngx_feature_name="NGX_QUIC"
|
|
|
|
ngx_feature_test="SSL_set_quic_method(NULL, NULL)"
|
|
|
|
. auto/feature
|
|
|
|
|
|
|
|
if [ $ngx_found = no ]; then
|
|
|
|
have=NGX_QUIC_OPENSSL_COMPAT . auto/have
|
|
|
|
|
|
|
|
ngx_feature="OpenSSL QUIC compatibility"
|
|
|
|
ngx_feature_test="SSL_CTX_add_custom_ext(NULL, 0, 0,
|
|
|
|
NULL, NULL, NULL, NULL, NULL)"
|
|
|
|
. auto/feature
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $ngx_found = no ]; then
|
|
|
|
cat << END
|
|
|
|
|
|
|
|
$0: error: certain modules require OpenSSL QUIC support.
|
|
|
|
You can either do not enable the modules, or install the OpenSSL library with
|
|
|
|
QUIC support into the system, or build the OpenSSL library with QUIC support
|
|
|
|
statically from the source with nginx by using --with-openssl=<path> option.
|
|
|
|
|
|
|
|
END
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
2010-07-08 23:57:36 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ $OPENSSL != YES ]; then
|
2009-05-26 22:28:49 +08:00
|
|
|
|
|
|
|
cat << END
|
|
|
|
|
|
|
|
$0: error: SSL modules require the OpenSSL library.
|
|
|
|
You can either do not enable the modules, or install the OpenSSL library
|
|
|
|
into the system, or build the OpenSSL library statically from the source
|
|
|
|
with nginx by using --with-openssl=<path> option.
|
|
|
|
|
|
|
|
END
|
2010-07-08 23:57:36 +08:00
|
|
|
exit 1
|
2010-07-08 23:51:47 +08:00
|
|
|
fi
|
2004-07-26 02:34:14 +08:00
|
|
|
|
2020-06-02 00:53:13 +08:00
|
|
|
fi
|