]> git.kaiwu.me - nginx.git/commitdiff
Merge of r4779, r4840, r4843, r4844: win32 changes.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 24 Sep 2012 18:37:14 +0000 (18:37 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 24 Sep 2012 18:37:14 +0000 (18:37 +0000)
*) Fixed build with Visual Studio 2005 Express.

   It is available via winetricks which makes it still usable, and has
   an old crtdefs.h which uses _CRT_SECURE_NO_DEPRECATE instead of
   _CRT_SECURE_NO_WARNINGS to suppress warnings.

   Reported by HAYASHI Kentaro,
   http://mailman.nginx.org/pipermail/nginx-devel/2012-August/002542.html

*) Configure: provide inflate() when building zlib on win32.

*) Helper target "win32" to run configure for win32 builds.

*) Updated zlib used for win32 builds.

auto/lib/zlib/makefile.bcc
auto/lib/zlib/makefile.msvc
auto/lib/zlib/makefile.owc
misc/GNUmakefile
src/os/win32/ngx_win32_config.h

index 56f8356884e28c19caa04c576a79b76f5f9f2842..97a30ea3951fcf225eb18175f978cbbde85b536f 100644 (file)
@@ -8,8 +8,10 @@ CFLAGS = -q -O2 -tWM -w-8004 -w-8012 $(CPU_OPT)
 zlib.lib:
        cd $(ZLIB)
 
-       bcc32 -c $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c \
-               compress.c
+       bcc32 -c $(CFLAGS) adler32.c crc32.c deflate.c \
+               trees.c zutil.c compress.c \
+               inflate.c inffast.c inftrees.c
 
        tlib zlib.lib +adler32.obj +crc32.obj +deflate.obj \
-               +trees.obj +zutil.obj +compress.obj
+               +trees.obj +zutil.obj +compress.obj \
+               +inflate.obj +inffast.obj +inftrees.obj
index 2c7c1ae1025cb43959f77ad7a92b2bae4791b4c6..6fbd6918c2fba515678a6ce3d6763704c42d3726 100644 (file)
@@ -8,7 +8,10 @@ CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT)
 zlib.lib:
        cd $(ZLIB)
 
-       cl -c $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c compress.c
+       cl -c $(CFLAGS) adler32.c crc32.c deflate.c \
+               trees.c zutil.c compress.c \
+               inflate.c inffast.c inftrees.c
 
        link -lib -out:zlib.lib adler32.obj crc32.obj deflate.obj \
-               trees.obj zutil.obj compress.obj
+               trees.obj zutil.obj compress.obj \
+               inflate.obj inffast.obj inftrees.obj
index f75e66d4f5bdb6fb906f7dc22c0f96aae42ce8ae..9e123be83e9c14bb4d75000d8e0bba0be039f72d 100644 (file)
@@ -9,6 +9,6 @@ zlib.lib:
        cd $(ZLIB)
 
        wcl386 -c $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c &
-               compress.c
+               compress.c inflate.c inffast.c inftrees.c
        wlib -n zlib.lib adler32.obj crc32.obj deflate.obj trees.obj &
-               zutil.obj compress.obj
+               zutil.obj compress.obj inflate.obj inffast.obj inftrees.obj
index a7fcd97140fc6acac188387993353f135c59c0fd..b437f963cad8f9bab74fe2c546aa9a396ccf9f83 100644 (file)
@@ -7,7 +7,7 @@ REPO =          $(shell svn info | sed -n 's/^Repository Root: //p')
 
 OBJS =         objs.msvc8
 OPENSSL =      openssl-1.0.1c
-ZLIB =         zlib-1.2.5
+ZLIB =         zlib-1.2.7
 PCRE =         pcre-8.31
 
 
@@ -83,6 +83,43 @@ snapshot:
 
        tar -c -z -f $(NGINX).tar.gz --directory $(TEMP) $(NGINX)
 
+win32:
+       ./auto/configure                                                \
+               --with-cc=cl                                            \
+               --builddir=${OBJS}                                      \
+               --with-debug                                            \
+               --prefix=                                               \
+               --conf-path=conf/nginx.conf                             \
+               --pid-path=logs/nginx.pid                               \
+               --http-log-path=logs/access.log                         \
+               --error-log-path=logs/error.log                         \
+               --sbin-path=nginx.exe                                   \
+               --http-client-body-temp-path=temp/client_body_temp      \
+               --http-proxy-temp-path=temp/proxy_temp                  \
+               --http-fastcgi-temp-path=temp/fastcgi_temp              \
+               --http-scgi-temp-path=temp/scgi_temp                    \
+               --http-uwsgi-temp-path=temp/uwsgi_temp                  \
+               --with-cc-opt=-DFD_SETSIZE=1024                         \
+               --with-pcre=${OBJS}/lib/${PCRE}                         \
+               --with-zlib=${OBJS}/lib/${ZLIB}                         \
+               --with-select_module                                    \
+               --with-http_realip_module                               \
+               --with-http_addition_module                             \
+               --with-http_sub_module                                  \
+               --with-http_dav_module                                  \
+               --with-http_stub_status_module                          \
+               --with-http_flv_module                                  \
+               --with-http_mp4_module                                  \
+               --with-http_gunzip_module                               \
+               --with-http_gzip_static_module                          \
+               --with-http_random_index_module                         \
+               --with-http_secure_link_module                          \
+               --with-mail                                             \
+               --with-openssl=${OBJS}/lib/${OPENSSL}                   \
+               --with-openssl-opt=enable-tlsext                        \
+               --with-http_ssl_module                                  \
+               --with-mail_ssl_module                                  \
+               --with-ipv6
 
 zip:
        rm -rf $(TEMP)
index 112fb412ac37ae02b30bd1aa9d4589b70859d771..eb3a95a3daee8132a62e95ec469bafc62aa52f72 100644 (file)
@@ -18,6 +18,7 @@
 
 /* enable getenv() and gmtime() in msvc8 */
 #define _CRT_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_DEPRECATE
 
 /*
  * we need to include <windows.h> explicitly before <winsock2.h> because