Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / auto / lib / openssl / conf
blob528ee1794e93f3285656ec07f5d3bebb7b2cd000
2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
6 if [ $OPENSSL != NONE ]; then
8     case "$CC" in
10         cl | bcc32)
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"
25         ;;
27         *)
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"
36         ;;
37     esac
39 else
41     if [ "$NGX_PLATFORM" != win32 ]; then
43         OPENSSL=NO
45         ngx_feature="OpenSSL library"
46         ngx_feature_name="NGX_OPENSSL"
47         ngx_feature_run=no
48         ngx_feature_incs="#include <openssl/ssl.h>"
49         ngx_feature_path=
50         ngx_feature_libs="-lssl -lcrypto"
51         ngx_feature_test="SSL_library_init()"
52         . auto/feature
54         if [ $ngx_found = yes ]; then
55             have=NGX_SSL . auto/have
56             CORE_LIBS="$CORE_LIBS $ngx_feature_libs $NGX_LIBDL"
57             OPENSSL=YES
58         fi
59     fi
61     if [ $OPENSSL != YES ]; then
63 cat << END
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.
70 END
71         exit 1
72     fi