summaryrefslogtreecommitdiff
path: root/winbuild
diff options
context:
space:
mode:
authorAlessandro Ghedini <alessandro@ghedini.me>2015-04-22 10:25:34 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2015-04-22 10:25:34 +0200
commit7b1fa5a0c5daf3831b9857c8fa678aaa6679d618 (patch)
treefd89ac2d30f1dcf60c769ec994177e1ae09fa3fa /winbuild
parenta8501fab9f2f579a6951c1cfcbc8f60b3d39af7f (diff)
Imported Upstream version 7.42.0
Diffstat (limited to 'winbuild')
-rw-r--r--winbuild/BUILD.WINDOWS.txt3
-rw-r--r--winbuild/Makefile.vc13
-rw-r--r--winbuild/MakefileBuild.vc31
-rwxr-xr-xwinbuild/gen_resp_file.bat10
4 files changed, 49 insertions, 8 deletions
diff --git a/winbuild/BUILD.WINDOWS.txt b/winbuild/BUILD.WINDOWS.txt
index 757c41f5..7d6b364e 100644
--- a/winbuild/BUILD.WINDOWS.txt
+++ b/winbuild/BUILD.WINDOWS.txt
@@ -19,7 +19,7 @@ Building with Visual C++, prerequises
http://www.microsoft.com/en-us/download/details.aspx?id=12261
- If you wish to support zlib, openssl, ssh2, you will have to download
+ If you wish to support zlib, openssl, c-ares, ssh2, you will have to download
them separately and copy them to the deps directory as shown below:
somedirectory\
@@ -64,6 +64,7 @@ where <options> is one or many of:
Libraries can be fetched at http://windows.php.net/downloads/php-sdk/deps/
Uncompress them into the deps folder.
WITH_SSL=<dll or static> - Enable OpenSSL support, DLL or static
+ WITH_CARES=<dll or static> - Enable c-ares support, DLL or static
WITH_ZLIB=<dll or static> - Enable zlib support, DLL or static
WITH_SSH2=<dll or static> - Enable libSSH2 support, DLL or static
ENABLE_SSPI=<yes or no> - Enable SSPI support, defaults to yes
diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
index 6dc58c4e..21e1614a 100644
--- a/winbuild/Makefile.vc
+++ b/winbuild/Makefile.vc
@@ -21,6 +21,7 @@ CFGSET=true
!MESSAGE Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/
!MESSAGE Uncompress them into the deps folder.
!MESSAGE WITH_SSL=<dll or static> - Enable OpenSSL support, DLL or static
+!MESSAGE WITH_CARES=<dll or static> - Enable c-ares support, DLL or static
!MESSAGE WITH_ZLIB=<dll or static> - Enable zlib support, DLL or static
!MESSAGE WITH_SSH2=<dll or static> - Enable libSSH2 support, DLL or static
!MESSAGE ENABLE_IDN=<yes or no> - Enable use of Windows IDN APIs, defaults to yes
@@ -107,6 +108,14 @@ USE_SSL = true
SSL = static
!ENDIF
+!IF "$(WITH_CARES)"=="dll"
+USE_CARES = true
+CARES = dll
+!ELSEIF "$(WITH_CARES)"=="static"
+USE_CARES = true
+CARES = static
+!ENDIF
+
!IF "$(WITH_ZLIB)"=="dll"
USE_ZLIB = true
ZLIB = dll
@@ -141,6 +150,10 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL)
!ENDIF
+!IF "$(USE_CARES)"=="true"
+CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-cares-$(CARES)
+!ENDIF
+
!IF "$(USE_ZLIB)"=="true"
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB)
!ENDIF
diff --git a/winbuild/MakefileBuild.vc b/winbuild/MakefileBuild.vc
index b9e150c4..2cad15c9 100644
--- a/winbuild/MakefileBuild.vc
+++ b/winbuild/MakefileBuild.vc
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1999 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1999 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -118,9 +118,30 @@ SSL = static
!ENDIF
!IFDEF USE_SSL
-SSL_CFLAGS = /DUSE_SSLEAY /I"$(DEVEL_INCLUDE)/openssl"
+SSL_CFLAGS = /DUSE_OPENSSL /I"$(DEVEL_INCLUDE)/openssl"
!ENDIF
+!IF "$(WITH_CARES)"=="dll"
+!IF "$(DEBUG)"=="yes"
+CARES_LIBS = caresd.lib
+!ELSE
+CARES_LIBS = cares.lib
+!ENDIF
+USE_CARES = true
+CARES = dll
+!ELSEIF "$(WITH_CARES)"=="static"
+!IF "$(DEBUG)"=="yes"
+CARES_LIBS = libcaresd.lib
+!ELSE
+CARES_LIBS = libcares.lib
+!ENDIF
+USE_CARES = true
+CARES = static
+!ENDIF
+
+!IFDEF USE_CARES
+CARES_CFLAGS = /DUSE_ARES /I"$(DEVEL_INCLUDE)/cares"
+!ENDIF
!IF "$(WITH_ZLIB)"=="dll"
ZLIB_LIBS = zlib.lib
@@ -297,6 +318,11 @@ CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(SSL_LIBS)
!ENDIF
+!IF "$(USE_CARES)"=="true"
+CFLAGS = $(CFLAGS) $(CARES_CFLAGS)
+LFLAGS = $(LFLAGS) $(CARES_LFLAGS) $(CARES_LIBS)
+!ENDIF
+
!IF "$(USE_ZLIB)"=="true"
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) $(ZLIB_LIBS)
@@ -376,6 +402,7 @@ package: $(TARGET)
$(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR)
@echo Using SSL: $(USE_SSL)
+ @echo Using c-ares: $(USE_CARES)
@echo Using SSH2: $(USE_SSH2)
@echo Using ZLIB: $(USE_ZLIB)
@echo Using IDN: $(USE_IDN)
diff --git a/winbuild/gen_resp_file.bat b/winbuild/gen_resp_file.bat
index d08b01ed..434f3696 100755
--- a/winbuild/gen_resp_file.bat
+++ b/winbuild/gen_resp_file.bat
@@ -1,6 +1,6 @@
-@echo OFF
-@del %OUTFILE%
-@echo %MACRO_NAME% = \> %OUTFILE%
+@echo OFF
+@del %OUTFILE%
+@echo %MACRO_NAME% = \> %OUTFILE%
@for %%i in (%*) do @echo %DIROBJ%/%%i \>> %OUTFILE%
-@echo. >> %OUTFILE%
-:END
+@echo. >> %OUTFILE%
+:END