Mercurial > hg > nginx
annotate auto/lib/sha1/conf @ 1808:e2f95fee98eb
handle old "server_name *"
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sat, 29 Dec 2007 19:05:21 +0000 |
parents | 7af8276b1c2f |
children | bd6cc5370fc1 |
rev | line source |
---|---|
653 | 1 |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
5 if [ $SHA1 != NONE ]; then | |
6 | |
7 CORE_INCS="$CORE_INCS $SHA1" | |
8 | |
9 case "$NGX_CC_NAME" in | |
10 | |
11 msvc* | owc* | bcc) | |
12 LINK_DEPS="$LINK_DEPS $SHA1/sha1.lib" | |
13 CORE_LIBS="$CORE_LIBS $SHA1/sha1.lib" | |
14 ;; | |
15 | |
16 icc*) | |
17 LINK_DEPS="$LINK_DEPS $SHA1/libsha.a" | |
18 | |
19 # to allow -ipo optimization we link with the *.o but not library | |
20 CORE_LIBS="$CORE_LIBS $SHA1/sha1_dgst.o" | |
21 | |
22 if [ $SHA1_ASM = YES ]; then | |
23 CORE_LIBS="$CORE_LIBS $SHA1/asm/sx86-elf.o" | |
24 fi | |
25 ;; | |
26 | |
27 *) | |
28 LINK_DEPS="$LINK_DEPS $SHA1/libsha.a" | |
29 CORE_LIBS="$CORE_LIBS $SHA1/libsha.a" | |
30 #CORE_LIBS="$CORE_LIBS -L $SHA1 -lsha" | |
31 ;; | |
32 | |
33 esac | |
34 | |
35 else | |
36 | |
37 if [ "$NGX_PLATFORM" != win32 ]; then | |
38 SHA1=NO | |
39 | |
40 # FreeBSD | |
41 | |
42 ngx_feature="sha1 in system md library" | |
43 ngx_feature_name= | |
44 ngx_feature_run=no | |
45 ngx_feature_incs="#include <sha.h>" | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
46 ngx_feature_path= |
653 | 47 ngx_feature_libs="-lmd" |
48 ngx_feature_test="SHA_CTX sha1; SHA1_Init(&sha1)" | |
49 . auto/feature | |
50 | |
51 | |
52 if [ $ngx_found = yes ]; then | |
53 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | |
54 SHA1=YES | |
55 SHA1_LIB=md | |
56 ngx_found=no | |
57 | |
58 else | |
59 if [ $SHA1 = NO ]; then | |
60 | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
61 # OpenSSL crypto library |
653 | 62 |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
63 ngx_feature="OpenSSL sha1 crypto library" |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
64 ngx_feature_name= |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
65 ngx_feature_run=no |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
66 ngx_feature_incs="#include <openssl/sha.h>" |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
67 ngx_feature_path= |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
68 ngx_feature_libs="-lcrypto" |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
69 ngx_feature_test="SHA_CTX sha1; SHA1_Init(&sha1)" |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
653
diff
changeset
|
70 . auto/feature |
653 | 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 | |
81 fi | |
82 | |
83 fi |