Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / auto / lib / sha1 / conf
blobfd69afda22bf7424066bf6b4d2017d4ae2c8009e
2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
6 if [ $SHA1 != NONE ]; then
8     have=NGX_HAVE_SHA1 . auto/have
9     CORE_INCS="$CORE_INCS $SHA1"
11     case "$NGX_CC_NAME" in
13         msvc* | owc* | bcc)
14             LINK_DEPS="$LINK_DEPS $SHA1/sha1.lib"
15             CORE_LIBS="$CORE_LIBS $SHA1/sha1.lib"
16         ;;
18         icc*)
19             LINK_DEPS="$LINK_DEPS $SHA1/libsha.a"
21             # to allow -ipo optimization we link with the *.o but not library
22             CORE_LIBS="$CORE_LIBS $SHA1/sha1_dgst.o"
24             if [ $SHA1_ASM = YES ]; then
25                 CORE_LIBS="$CORE_LIBS $SHA1/asm/sx86-elf.o"
26             fi
27         ;;
29         *)
30             LINK_DEPS="$LINK_DEPS $SHA1/libsha.a"
31             CORE_LIBS="$CORE_LIBS $SHA1/libsha.a"
32             #CORE_LIBS="$CORE_LIBS -L $SHA1 -lsha"
33         ;;
35     esac
37 else
39     if [ "$NGX_PLATFORM" != win32 ]; then
41         SHA1=NO
43         # FreeBSD
45         ngx_feature="sha1 in system md library"
46         ngx_feature_name=NGX_HAVE_SHA1
47         ngx_feature_run=no
48         ngx_feature_incs="#include <sha.h>"
49         ngx_feature_path=
50         ngx_feature_libs="-lmd"
51         ngx_feature_test="SHA_CTX sha1; SHA1_Init(&sha1)"
52         . auto/feature
54         ngx_sha1_lib="system md"
56         if [ $ngx_found = no ]; then
58             # OpenSSL crypto library
60             ngx_feature="sha1 in system OpenSSL crypto library"
61             ngx_feature_incs="#include <openssl/sha.h>"
62             ngx_feature_libs="-lcrypto"
63             . auto/feature
65             ngx_sha1_lib="system crypto"
67             if [ $ngx_found = yes ]; then
68                 have=NGX_HAVE_OPENSSL_SHA1_H . auto/have
69             fi
70         fi
72         if [ $ngx_found = yes ]; then
73             CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
74             SHA1=YES
75             SHA1_LIB=$ngx_sha1_lib
76         fi
77     fi