Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / auto / lib / md5 / conf
blobeb5dfd1f2362986fe771b7196e5190c73fc1c884
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
9         # OpenSSL md5
10         OPENSSL_MD5=YES
11         have=NGX_HAVE_OPENSSL_MD5 . auto/have
12         have=NGX_OPENSSL_MD5 . auto/have
13     else
14         # rsaref md5
15         OPENSSL_MD5=NO
16     fi
18     have=NGX_HAVE_MD5 . auto/have
19     CORE_INCS="$CORE_INCS $MD5"
21     case "$NGX_CC_NAME" in
23         msvc* | owc* | bcc)
24             LINK_DEPS="$LINK_DEPS $MD5/md5.lib"
25             CORE_LIBS="$CORE_LIBS $MD5/md5.lib"
26         ;;
28         icc*)
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"
36             fi
37         ;;
39         *)
40             LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
41             CORE_LIBS="$CORE_LIBS $MD5/libmd5.a"
42             #CORE_LIBS="$CORE_LIBS -L $MD5 -lmd5"
43         ;;
45     esac
47 else
49     if [ "$NGX_PLATFORM" != win32 ]; then
51             MD5=NO
53             # FreeBSD, Solaris 10
55             ngx_feature="md5 in system md library"
56             ngx_feature_name=NGX_HAVE_MD5
57             ngx_feature_run=no
58             ngx_feature_incs="#include <md5.h>"
59             ngx_feature_path=
60             ngx_feature_libs="-lmd"
61             ngx_feature_test="MD5_CTX md5; MD5Init(&md5)"
62             . auto/feature
64             ngx_md5_lib="system md"
66         if [ $ngx_found = no ]; then
68             # Solaris 8/9
70             ngx_feature="md5 in system md5 library"
71             ngx_feature_libs="-lmd5"
72             . auto/feature
74             ngx_md5_lib="system md5"
75         fi
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)"
86             . auto/feature
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
93             fi
94         fi
96         if [ $ngx_found = yes ]; then
97             CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
98             MD5=YES
99             MD5_LIB=$ngx_md5_lib
100         fi
101     fi