Mercurial > hg > nginx
comparison auto/lib/md5/conf @ 2010:bd6cc5370fc1
simplify library autoconfigure
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 16 May 2008 14:32:58 +0000 |
parents | 7af8276b1c2f |
children | d7368a34b6fa |
comparison
equal
deleted
inserted
replaced
2009:df5ae577fab5 | 2010:bd6cc5370fc1 |
---|---|
43 esac | 43 esac |
44 | 44 |
45 else | 45 else |
46 | 46 |
47 if [ "$NGX_PLATFORM" != win32 ]; then | 47 if [ "$NGX_PLATFORM" != win32 ]; then |
48 | |
48 MD5=NO | 49 MD5=NO |
49 | 50 |
50 # Solaris 8/9 | 51 # Solaris 8/9 |
51 | 52 |
52 ngx_feature="rsaref md5 library" | 53 ngx_feature="rsaref md5 library" |
56 ngx_feature_path= | 57 ngx_feature_path= |
57 ngx_feature_libs="-lmd5" | 58 ngx_feature_libs="-lmd5" |
58 ngx_feature_test="MD5_CTX md5; MD5Init(&md5)" | 59 ngx_feature_test="MD5_CTX md5; MD5Init(&md5)" |
59 . auto/feature | 60 . auto/feature |
60 | 61 |
61 if [ $ngx_found = yes ]; then | 62 ngx_md5_lib="system md5" |
62 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | |
63 MD5=YES | |
64 MD5_LIB=md5 | |
65 ngx_found=no | |
66 | 63 |
67 else | 64 if [ $ngx_found = no ]; then |
65 | |
68 # FreeBSD | 66 # FreeBSD |
69 | 67 |
70 ngx_feature="rsaref md library" | 68 ngx_feature="rsaref md library" |
71 ngx_feature_name= | |
72 ngx_feature_run=no | |
73 ngx_feature_incs="#include <md5.h>" | |
74 ngx_feature_path= | |
75 ngx_feature_libs="-lmd" | 69 ngx_feature_libs="-lmd" |
76 ngx_feature_test="MD5_CTX md5; MD5Init(&md5)" | |
77 . auto/feature | 70 . auto/feature |
71 | |
72 ngx_md5_lib="system md" | |
78 fi | 73 fi |
79 | 74 |
75 if [ $ngx_found = no ]; then | |
76 | |
77 # OpenSSL crypto library | |
78 | |
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)" | |
84 . auto/feature | |
85 | |
86 ngx_md5_lib="system crypto" | |
87 | |
88 if [ $ngx_found = yes ]; then | |
89 have=NGX_HAVE_OPENSSL_MD5_H . auto/have | |
90 fi | |
91 fi | |
80 | 92 |
81 if [ $ngx_found = yes ]; then | 93 if [ $ngx_found = yes ]; then |
82 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | 94 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" |
83 MD5=YES | 95 MD5=YES |
84 MD5_LIB=md | 96 MD5_LIB=$ngx_md5_lib |
85 ngx_found=no | |
86 | |
87 else | |
88 if [ $MD5 = NO ]; then | |
89 | |
90 # OpenSSL crypto library | |
91 | |
92 ngx_feature="OpenSSL md5 crypto library" | |
93 ngx_feature_name="NGX_OPENSSL_MD5" | |
94 ngx_feature_run=no | |
95 ngx_feature_incs="#include <openssl/md5.h>" | |
96 ngx_feature_path= | |
97 ngx_feature_libs="-lcrypto" | |
98 ngx_feature_test="MD5_CTX md5; MD5_Init(&md5)" | |
99 . auto/feature | |
100 fi | |
101 fi | 97 fi |
102 | 98 |
103 | |
104 if [ $ngx_found = yes ]; then | |
105 have=NGX_HAVE_OPENSSL_MD5_H . auto/have | |
106 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | |
107 MD5=YES | |
108 MD5_LIB=crypto | |
109 fi | |
110 fi | 99 fi |
111 | 100 |
112 fi | 101 fi |