2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
6 if [ $MD5 != NONE ]; then
8 if grep MD5_Init $MD5/md5.h 2>&1 >/dev/null; then
11 have=NGX_HAVE_OPENSSL_MD5 . auto/have
12 have=NGX_OPENSSL_MD5 . auto/have
18 have=NGX_HAVE_MD5 . auto/have
19 CORE_INCS="$CORE_INCS $MD5"
21 case "$NGX_CC_NAME" in
24 LINK_DEPS="$LINK_DEPS $MD5/md5.lib"
25 CORE_LIBS="$CORE_LIBS $MD5/md5.lib"
29 LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
31 # to allow -ipo optimization we link with the *.o but not library
32 CORE_LIBS="$CORE_LIBS $MD5/md5_dgst.o"
34 if [ $MD5_ASM = YES ]; then
35 CORE_LIBS="$CORE_LIBS $MD5/asm/mx86-elf.o"
40 LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
41 CORE_LIBS="$CORE_LIBS $MD5/libmd5.a"
42 #CORE_LIBS="$CORE_LIBS -L $MD5 -lmd5"
49 if [ "$NGX_PLATFORM" != win32 ]; then
55 ngx_feature="md5 in system md library"
56 ngx_feature_name=NGX_HAVE_MD5
58 ngx_feature_incs="#include <md5.h>"
60 ngx_feature_libs="-lmd"
61 ngx_feature_test="MD5_CTX md5; MD5Init(&md5)"
64 ngx_md5_lib="system md"
66 if [ $ngx_found = no ]; then
70 ngx_feature="md5 in system md5 library"
71 ngx_feature_libs="-lmd5"
74 ngx_md5_lib="system md5"
77 if [ $ngx_found = no ]; then
79 # OpenSSL crypto library
81 ngx_feature="md5 in system OpenSSL crypto library"
82 ngx_feature_name="NGX_OPENSSL_MD5"
83 ngx_feature_incs="#include <openssl/md5.h>"
84 ngx_feature_libs="-lcrypto"
85 ngx_feature_test="MD5_CTX md5; MD5_Init(&md5)"
88 ngx_md5_lib="system crypto"
90 if [ $ngx_found = yes ]; then
91 have=NGX_HAVE_OPENSSL_MD5_H . auto/have
92 have=NGX_HAVE_MD5 . auto/have
96 if [ $ngx_found = yes ]; then
97 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"