~nginx/nginx/1.0

« back to all changes in this revision

Viewing changes to auto/lib/sha1/conf

  • Committer: Michael Lustfield
  • Date: 2010-12-01 08:06:25 UTC
  • Revision ID: michael@profarius.com-20101201080625-y8i4bq0e54ev2qwy
Tags: 0.9.0
Nginx v0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# Copyright (C) Igor Sysoev
 
3
 
 
4
 
 
5
if [ $SHA1 != NONE ]; then
 
6
 
 
7
    CORE_INCS="$CORE_INCS $SHA1"
 
8
 
 
9
    case "$NGX_CC_NAME" in
 
10
 
 
11
        msvc* | owc* | bcc)
 
12
            LINK_DEPS="$LINK_DEPS $SHA1/sha1.lib"
 
13
            CORE_LIBS="$CORE_LIBS $SHA1/sha1.lib"
 
14
        ;;
 
15
 
 
16
        icc*)
 
17
            LINK_DEPS="$LINK_DEPS $SHA1/libsha.a"
 
18
 
 
19
            # to allow -ipo optimization we link with the *.o but not library
 
20
            CORE_LIBS="$CORE_LIBS $SHA1/sha1_dgst.o"
 
21
 
 
22
            if [ $SHA1_ASM = YES ]; then
 
23
                CORE_LIBS="$CORE_LIBS $SHA1/asm/sx86-elf.o"
 
24
            fi
 
25
        ;;
 
26
 
 
27
        *)
 
28
            LINK_DEPS="$LINK_DEPS $SHA1/libsha.a"
 
29
            CORE_LIBS="$CORE_LIBS $SHA1/libsha.a"
 
30
            #CORE_LIBS="$CORE_LIBS -L $SHA1 -lsha"
 
31
        ;;
 
32
 
 
33
    esac
 
34
 
 
35
else
 
36
 
 
37
    if [ "$NGX_PLATFORM" != win32 ]; then
 
38
 
 
39
        SHA1=NO
 
40
 
 
41
        # FreeBSD
 
42
 
 
43
        ngx_feature="sha1 in system md library"
 
44
        ngx_feature_name=
 
45
        ngx_feature_run=no
 
46
        ngx_feature_incs="#include <sha.h>"
 
47
        ngx_feature_path=
 
48
        ngx_feature_libs="-lmd"
 
49
        ngx_feature_test="SHA_CTX sha1; SHA1_Init(&sha1)"
 
50
        . auto/feature
 
51
 
 
52
        ngx_sha1_lib="system md"
 
53
 
 
54
        if [ $ngx_found = no ]; then
 
55
 
 
56
            # OpenSSL crypto library
 
57
 
 
58
            ngx_feature="OpenSSL sha1 crypto library"
 
59
            ngx_feature_incs="#include <openssl/sha.h>"
 
60
            ngx_feature_libs="-lcrypto"
 
61
            . auto/feature
 
62
 
 
63
            ngx_sha1_lib="system crypto"
 
64
 
 
65
            if [ $ngx_found = yes ]; then
 
66
                have=NGX_HAVE_OPENSSL_SHA1_H . auto/have
 
67
            fi
 
68
        fi
 
69
 
 
70
        if [ $ngx_found = yes ]; then
 
71
            CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
 
72
            SHA1=YES
 
73
            SHA1_LIB=$ngx_sha1_lib
 
74
        fi
 
75
    fi
 
76
 
 
77
fi