upstream nginx-0.7.31
[nginx.git] / nginx / auto / lib / openssl / conf
1
2 # Copyright (C) Igor Sysoev
3
4
5 if [ $OPENSSL != NONE ]; then
6     CORE_INCS="$CORE_INCS $OPENSSL/include"
7
8     case "$CC" in
9         *)
10             have=NGX_OPENSSL . auto/have
11             have=NGX_SSL . auto/have
12             LINK_DEPS="$LINK_DEPS $OPENSSL/libssl.a $OPENSSL/libcrypto.a"
13             CORE_LIBS="$CORE_LIBS $OPENSSL/libssl.a $OPENSSL/libcrypto.a"
14         ;;
15     esac
16
17     case "$NGX_SYSTEM" in
18         SunOS|Linux)
19             CORE_LIBS="$CORE_LIBS -ldl"
20         ;;
21     esac
22
23
24 else
25
26     case "$NGX_PLATFORM" in
27
28         win32)
29             have=NGX_OPENSSL . auto/have
30             have=NGX_SSL . auto/have
31             OPENSSL=YES
32
33             CORE_INCS="$CORE_INCS c:/openssl/include"
34             CORE_LIBS="$CORE_LIBS c:/openssl/ssleay32.lib"
35             CORE_LIBS="$CORE_LIBS c:/openssl/libeay32.lib"
36
37             # libeay32.lib requires gdi32.lib
38             CORE_LIBS="$CORE_LIBS gdi32.lib"
39             # OpenSSL 0.8's libeay32.lib requires advapi32.lib
40             CORE_LIBS="$CORE_LIBS advapi32.lib"
41         ;;
42
43         *)
44             OPENSSL=NO
45
46             ngx_feature="OpenSSL library"
47             ngx_feature_name="NGX_OPENSSL"
48             ngx_feature_run=no
49             ngx_feature_incs="#include <openssl/ssl.h>"
50             ngx_feature_path=
51             ngx_feature_libs="-lssl -lcrypto"
52             ngx_feature_test="SSL_library_init()"
53             . auto/feature
54
55             if [ $ngx_found = yes ]; then
56                 have=NGX_SSL . auto/have
57                 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
58                 OPENSSL=YES
59
60                 case "$NGX_SYSTEM" in
61                     SunOS)
62                         CORE_LIBS="$CORE_LIBS -ldl"
63                     ;;
64                 esac
65             fi
66         ;;
67
68     esac
69
70 fi