2 # Copyright (C) Igor Sysoev
5 if [ $SHA1 != NONE ]; then
7 CORE_INCS="$CORE_INCS $SHA1"
12 LINK_DEPS="$LINK_DEPS $SHA1/sha1.lib"
13 CORE_LIBS="$CORE_LIBS $SHA1/sha1.lib"
17 LINK_DEPS="$LINK_DEPS $SHA1/libsha.a"
19 # to allow -ipo optimization we link with the *.o but not library
20 CORE_LIBS="$CORE_LIBS $SHA1/sha1_dgst.o"
22 if [ $SHA1_ASM = YES ]; then
23 CORE_LIBS="$CORE_LIBS $SHA1/asm/sx86-elf.o"
28 LINK_DEPS="$LINK_DEPS $SHA1/libsha.a"
29 CORE_LIBS="$CORE_LIBS $SHA1/libsha.a"
30 #CORE_LIBS="$CORE_LIBS -L $SHA1 -lsha"
37 if [ "$NGX_PLATFORM" != win32 ]; then
43 ngx_feature="sha1 in system md library"
46 ngx_feature_incs="#include <sha.h>"
48 ngx_feature_libs="-lmd"
49 ngx_feature_test="SHA_CTX sha1; SHA1_Init(&sha1)"
52 ngx_sha1_lib="system md"
54 if [ $ngx_found = no ]; then
56 # OpenSSL crypto library
58 ngx_feature="OpenSSL sha1 crypto library"
59 ngx_feature_incs="#include <openssl/sha.h>"
60 ngx_feature_libs="-lcrypto"
63 ngx_sha1_lib="system crypto"
65 if [ $ngx_found = yes ]; then
66 have=NGX_HAVE_OPENSSL_SHA1_H . auto/have
70 if [ $ngx_found = yes ]; then
71 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
73 SHA1_LIB=$ngx_sha1_lib