Mercurial > hg > nginx
comparison auto/lib/sha1/conf @ 2010:bd6cc5370fc1
simplify library autoconfigure
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 16 May 2008 14:32:58 +0000 |
parents | 7af8276b1c2f |
children | 9c057d5e1c27 |
comparison
equal
deleted
inserted
replaced
2009:df5ae577fab5 | 2010:bd6cc5370fc1 |
---|---|
33 esac | 33 esac |
34 | 34 |
35 else | 35 else |
36 | 36 |
37 if [ "$NGX_PLATFORM" != win32 ]; then | 37 if [ "$NGX_PLATFORM" != win32 ]; then |
38 | |
38 SHA1=NO | 39 SHA1=NO |
39 | 40 |
40 # FreeBSD | 41 # FreeBSD |
41 | 42 |
42 ngx_feature="sha1 in system md library" | 43 ngx_feature="sha1 in system md library" |
46 ngx_feature_path= | 47 ngx_feature_path= |
47 ngx_feature_libs="-lmd" | 48 ngx_feature_libs="-lmd" |
48 ngx_feature_test="SHA_CTX sha1; SHA1_Init(&sha1)" | 49 ngx_feature_test="SHA_CTX sha1; SHA1_Init(&sha1)" |
49 . auto/feature | 50 . auto/feature |
50 | 51 |
52 ngx_sha1_lib="system md" | |
53 | |
54 if [ $ngx_found = no ]; then | |
55 | |
56 # OpenSSL crypto library | |
57 | |
58 ngx_feature="OpenSSL sha1 crypto library" | |
59 ngx_feature_incs="#include <openssl/sha.h>" | |
60 ngx_feature_libs="-lcrypto" | |
61 . auto/feature | |
62 | |
63 ngx_sha1_lib="system crypto" | |
64 | |
65 if [ $ngx_found = yes ]; then | |
66 have=NGX_HAVE_OPENSSL_SHA1_H . auto/have | |
67 fi | |
68 fi | |
51 | 69 |
52 if [ $ngx_found = yes ]; then | 70 if [ $ngx_found = yes ]; then |
53 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | 71 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" |
54 SHA1=YES | 72 SHA1=YES |
55 SHA1_LIB=md | 73 SHA1_LIB=$ngx_sha1_lib |
56 ngx_found=no | |
57 | |
58 else | |
59 if [ $SHA1 = NO ]; then | |
60 | |
61 # OpenSSL crypto library | |
62 | |
63 ngx_feature="OpenSSL sha1 crypto library" | |
64 ngx_feature_name= | |
65 ngx_feature_run=no | |
66 ngx_feature_incs="#include <openssl/sha.h>" | |
67 ngx_feature_path= | |
68 ngx_feature_libs="-lcrypto" | |
69 ngx_feature_test="SHA_CTX sha1; SHA1_Init(&sha1)" | |
70 . auto/feature | |
71 fi | |
72 fi | |
73 | |
74 | |
75 if [ $ngx_found = yes ]; then | |
76 have=NGX_HAVE_OPENSSL_SHA1_H . auto/have | |
77 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | |
78 SHA1=YES | |
79 SHA1_LIB=crypto | |
80 fi | 74 fi |
81 fi | 75 fi |
82 | 76 |
83 fi | 77 fi |