diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2004-04-08 15:58:25 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2004-04-08 15:58:25 +0000 |
| commit | fff32326ca9009ebba0aadd24aa0683afe0d4a02 (patch) | |
| tree | ac738d570dd46b0ef6b15b09b42d9956245f5005 /auto/lib | |
| parent | 9a864bd8f87efd0fa23f552d4277475dd76bcea4 (diff) | |
| download | nginx-fff32326ca9009ebba0aadd24aa0683afe0d4a02.tar.gz nginx-fff32326ca9009ebba0aadd24aa0683afe0d4a02.tar.bz2 | |
nginx-0.0.3-2004-04-08-19:58:25 import
Diffstat (limited to 'auto/lib')
| -rw-r--r-- | auto/lib/md5/conf | 100 | ||||
| -rw-r--r-- | auto/lib/pcre/conf | 30 | ||||
| -rw-r--r-- | auto/lib/test | 5 | ||||
| -rw-r--r-- | auto/lib/zlib/conf | 22 |
4 files changed, 88 insertions, 69 deletions
diff --git a/auto/lib/md5/conf b/auto/lib/md5/conf index d5b2a0afd..8871038b0 100644 --- a/auto/lib/md5/conf +++ b/auto/lib/md5/conf @@ -40,57 +40,59 @@ if [ $MD5 != NONE ]; then else -ngx_lib_inc="#include <sys/types.h> -#include <md5.h>" - - MD5=NO - - # Solaris 8/9 - - ngx_lib="rsaref md5" - ngx_lib_test="MD5_CTX md5; MD5Init(&md5)" - ngx_libs=-lmd5 - . auto/lib/test - + if [ $PLATFORM != win32 ]; then + MD5=NO - if [ $ngx_found = yes ]; then - CORE_LIBS="$CORE_LIBS $ngx_libs" - MD5=YES - MD5_LIB=md5 - ngx_found=no - - else - # FreeBSD - - ngx_lib="rsaref md" - ngx_lib_test="MD5_CTX md5; MD5Init(&md5)" - ngx_libs=-lmd - . auto/lib/test - fi + # Solaris 8/9 - - if [ $ngx_found = yes ]; then - CORE_LIBS="$CORE_LIBS $ngx_libs" - MD5=YES - MD5_LIB=md - ngx_found=no - - else - # OpenSSL crypto library - - ngx_inc="#include <openssl/md5.h>" - ngx_lib="OpenSSL md5 crypto" - ngx_lib_test="MD5_CTX md5; MD5_Init(&md5)" - ngx_libs=-lcrypto - . auto/lib/test + ngx_lib_inc="#include <sys/types.h> +#include <md5.h>" + ngx_lib="rsaref md5 library" + ngx_lib_test="MD5_CTX md5; MD5Init(&md5)" + ngx_libs=-lmd5 + . auto/lib/test + + + if [ $ngx_found = yes ]; then + CORE_LIBS="$CORE_LIBS $ngx_libs" + MD5=YES + MD5_LIB=md5 + ngx_found=no + + else + # FreeBSD + + ngx_lib="rsaref md library" + ngx_lib_test="MD5_CTX md5; MD5Init(&md5)" + ngx_libs=-lmd + . auto/lib/test + fi + + + if [ $ngx_found = yes ]; then + CORE_LIBS="$CORE_LIBS $ngx_libs" + MD5=YES + MD5_LIB=md + ngx_found=no + + else + # OpenSSL crypto library + + ngx_inc="#include <openssl/md5.h>" + ngx_lib="OpenSSL md5 crypto library" + ngx_lib_test="MD5_CTX md5; MD5_Init(&md5)" + ngx_libs=-lcrypto + . auto/lib/test + fi + + + if [ $ngx_found = yes ]; then + have=HAVE_OPENSSL_MD5 . auto/have + have=HAVE_OPENSSL_MD5_H . auto/have + CORE_LIBS="$CORE_LIBS $ngx_libs" + MD5=YES + MD5_LIB=crypto + fi fi - - if [ $ngx_found = yes ]; then - have=HAVE_OPENSSL_MD5 . auto/have - have=HAVE_OPENSSL_MD5_H . auto/have - CORE_LIBS="$CORE_LIBS $ngx_libs" - MD5=YES - MD5_LIB=crypto - fi fi diff --git a/auto/lib/pcre/conf b/auto/lib/pcre/conf index fa50c24e9..a907e8b50 100644 --- a/auto/lib/pcre/conf +++ b/auto/lib/pcre/conf @@ -40,24 +40,38 @@ if [ $PCRE != NONE ]; then else if [ $PLATFORM != win32 ]; then - ngx_lib_inc="#include <pcre.h>" + PCRE=NO - ngx_lib="PCRE" - ngx_lib_test="pcre *re; pcre_compile(re, 0, NULL, 0, NULL)" - ngx_libs=-lpcre - . auto/lib/test + ngx_lib_inc="#include <pcre.h>" + ngx_lib="PCRE library" + ngx_lib_test="pcre *re; pcre_compile(re, 0, NULL, 0, NULL)" + ngx_libs=-lpcre + . auto/lib/test if [ $ngx_found = yes ]; then have=HAVE_PCRE . auto/have - CORE_DEPS="$CORE_DEPS $REGEX_DEPS" CORE_SRCS="$CORE_SRCS $REGEX_SRCS" CORE_LIBS="$CORE_LIBS $ngx_libs" - PCRE=YES + else - PCRE=NO + # FreeBSD PCRE port. + + ngx_lib="PCRE library in /usr/local/" + ngx_lib_cflags="-I /usr/local/include" + . auto/lib/test + fi + + + if [ $ngx_found = yes ]; then + have=HAVE_PCRE . auto/have + CORE_DEPS="$CORE_DEPS $REGEX_DEPS" + CORE_INCS="$CORE_INCS /usr/local/include" + CORE_SRCS="$CORE_SRCS $REGEX_SRCS" + CORE_LIBS="$CORE_LIBS $ngx_libs" + PCRE=YES fi fi diff --git a/auto/lib/test b/auto/lib/test index d030655e1..3519a6c5c 100644 --- a/auto/lib/test +++ b/auto/lib/test @@ -1,5 +1,5 @@ -echo $ngx_n "checking for $ngx_lib library ..." $ngx_c +echo $ngx_n "checking for $ngx_lib ..." $ngx_c echo >> $NGX_ERR echo "checking for $ngx_lib library" >> $NGX_ERR @@ -8,7 +8,8 @@ ngx_found=no echo "$ngx_lib_inc" > $NGX_AUTOTEST.c echo "int main() { $ngx_lib_test; return 0; }" >> $NGX_AUTOTEST.c -eval "$CC $cc_test_flags -o $NGX_AUTOTEST $NGX_AUTOTEST.c $ngx_libs \ +eval "$CC $cc_test_flags $ngx_lib_cflags \ + -o $NGX_AUTOTEST $NGX_AUTOTEST.c $ngx_libs \ >> $NGX_ERR 2>&1" if [ -x $NGX_AUTOTEST ]; then diff --git a/auto/lib/zlib/conf b/auto/lib/zlib/conf index 7376abd70..9c2178fad 100644 --- a/auto/lib/zlib/conf +++ b/auto/lib/zlib/conf @@ -34,19 +34,21 @@ if [ $ZLIB != NONE ]; then else - ngx_lib_inc="#include <zlib.h>" + if [ $PLATFORM != win32 ]; then + ngx_lib_inc="#include <zlib.h>" - ngx_lib="zlib" - ngx_lib_test="z_stream z; deflate(&z, Z_NO_FLUSH)" - ngx_libs=-lz - . auto/lib/test + ngx_lib="zlib library" + ngx_lib_test="z_stream z; deflate(&z, Z_NO_FLUSH)" + ngx_libs=-lz + . auto/lib/test - if [ $ngx_found = yes ]; then - CORE_LIBS="$CORE_LIBS $ngx_libs" - ZLIB=YES - else - ZLIB=NO + if [ $ngx_found = yes ]; then + CORE_LIBS="$CORE_LIBS $ngx_libs" + ZLIB=YES + else + ZLIB=NO + fi fi fi |
