2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
6 if [ $OPENSSL != NONE ]; then
11 have=NGX_OPENSSL . auto/have
12 have=NGX_SSL . auto/have
14 CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
16 CORE_INCS="$CORE_INCS $OPENSSL/openssl/include"
17 CORE_DEPS="$CORE_DEPS $OPENSSL/openssl/include/openssl/ssl.h"
18 CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/ssleay32.lib"
19 CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/libeay32.lib"
21 # libeay32.lib requires gdi32.lib
22 CORE_LIBS="$CORE_LIBS gdi32.lib"
23 # OpenSSL 1.0.0 requires crypt32.lib
24 CORE_LIBS="$CORE_LIBS crypt32.lib"
28 have=NGX_OPENSSL . auto/have
29 have=NGX_SSL . auto/have
31 CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
32 CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
33 CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
34 CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
35 CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
41 if [ "$NGX_PLATFORM" != win32 ]; then
45 ngx_feature="OpenSSL library"
46 ngx_feature_name="NGX_OPENSSL"
48 ngx_feature_incs="#include <openssl/ssl.h>"
50 ngx_feature_libs="-lssl -lcrypto"
51 ngx_feature_test="SSL_library_init()"
54 if [ $ngx_found = yes ]; then
55 have=NGX_SSL . auto/have
56 CORE_LIBS="$CORE_LIBS $ngx_feature_libs $NGX_LIBDL"
61 if [ $OPENSSL != YES ]; then
65 $0: error: SSL modules require the OpenSSL library.
66 You can either do not enable the modules, or install the OpenSSL library
67 into the system, or build the OpenSSL library statically from the source
68 with nginx by using --with-openssl=<path> option.