2 # Copyright (C) Igor Sysoev
5 if [ $MD5 != NONE ]; then
7 if grep MD5_Init $MD5/md5.h >/dev/null; then
10 have=NGX_HAVE_OPENSSL_MD5 . auto/have
11 have=NGX_OPENSSL_MD5 . auto/have
17 CORE_INCS="$CORE_INCS $MD5"
19 case "$NGX_CC_NAME" in
22 LINK_DEPS="$LINK_DEPS $MD5/md5.lib"
23 CORE_LIBS="$CORE_LIBS $MD5/md5.lib"
27 LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
29 # to allow -ipo optimization we link with the *.o but not library
30 CORE_LIBS="$CORE_LIBS $MD5/md5_dgst.o"
32 if [ $MD5_ASM = YES ]; then
33 CORE_LIBS="$CORE_LIBS $MD5/asm/mx86-elf.o"
38 LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
39 CORE_LIBS="$CORE_LIBS $MD5/libmd5.a"
40 #CORE_LIBS="$CORE_LIBS -L $MD5 -lmd5"
47 if [ "$NGX_PLATFORM" != win32 ]; then
53 ngx_feature="rsaref md5 library"
56 ngx_feature_incs="#include <md5.h>"
58 ngx_feature_libs="-lmd5"
59 ngx_feature_test="MD5_CTX md5; MD5Init(&md5)"
62 ngx_md5_lib="system md5"
64 if [ $ngx_found = no ]; then
68 ngx_feature="rsaref md library"
69 ngx_feature_libs="-lmd"
72 ngx_md5_lib="system md"
75 if [ $ngx_found = no ]; then
77 # OpenSSL crypto library
79 ngx_feature="OpenSSL md5 crypto library"
80 ngx_feature_name="NGX_OPENSSL_MD5"
81 ngx_feature_incs="#include <openssl/md5.h>"
82 ngx_feature_libs="-lcrypto"
83 ngx_feature_test="MD5_CTX md5; MD5_Init(&md5)"
86 ngx_md5_lib="system crypto"
88 if [ $ngx_found = yes ]; then
89 have=NGX_HAVE_OPENSSL_MD5_H . auto/have
93 if [ $ngx_found = yes ]; then
94 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"