~ubuntu-branches/ubuntu/trusty/nginx/trusty-proposed

« back to all changes in this revision

Viewing changes to auto/lib/openssl/conf

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry
  • Date: 2013-04-25 12:51:45 UTC
  • mfrom: (1.3.28)
  • mto: (1.3.29) (15.1.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 64.
  • Revision ID: package-import@ubuntu.com-20130425125145-ugl0wor6bq0u5eae
Tags: upstream-1.4.0
ImportĀ upstreamĀ versionĀ 1.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
# Copyright (C) Igor Sysoev
 
3
# Copyright (C) Nginx, Inc.
3
4
 
4
5
 
5
6
if [ $OPENSSL != NONE ]; then
6
 
    CORE_INCS="$CORE_INCS $OPENSSL/include"
7
7
 
8
8
    case "$CC" in
 
9
 
 
10
        cl | bcc32)
 
11
            have=NGX_OPENSSL . auto/have
 
12
            have=NGX_SSL . auto/have
 
13
 
 
14
            CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
 
15
 
 
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"
 
20
 
 
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
        ;;
 
26
 
9
27
        *)
10
28
            have=NGX_OPENSSL . auto/have
11
29
            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
 
 
 
30
 
 
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
23
38
 
24
39
else
25
40
 
26
 
    case "$NGX_PLATFORM" in
27
 
 
28
 
        win32)
29
 
            have=NGX_OPENSSL . auto/have
 
41
    if [ "$NGX_PLATFORM" != win32 ]; then
 
42
 
 
43
        OPENSSL=NO
 
44
 
 
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
 
53
 
 
54
        if [ $ngx_found = yes ]; then
30
55
            have=NGX_SSL . auto/have
 
56
            CORE_LIBS="$CORE_LIBS $ngx_feature_libs $NGX_LIBDL"
31
57
            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
 
58
        fi
 
59
    fi
 
60
 
 
61
    if [ $OPENSSL != YES ]; then
 
62
 
 
63
cat << END
 
64
 
 
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.
 
69
 
 
70
END
 
71
        exit 1
 
72
    fi
69
73
 
70
74
fi