mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
winbuild: Added option to build with c-ares
Added support for a WITH_CARES option to be used when invoking nmake via Makefile.vc. This option enables linking against both the DLL and static versions of the c-ares libraries, as well as the debug and release varients, depending on the value of DEBUG. The USE_ARES preprocessor symbol is also defined.
This commit is contained in:
parent
c712fe01a9
commit
659d252b6f
@ -19,7 +19,7 @@ Building with Visual C++, prerequises
|
|||||||
|
|
||||||
http://www.microsoft.com/en-us/download/details.aspx?id=12261
|
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:
|
them separately and copy them to the deps directory as shown below:
|
||||||
|
|
||||||
somedirectory\
|
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/
|
Libraries can be fetched at http://windows.php.net/downloads/php-sdk/deps/
|
||||||
Uncompress them into the deps folder.
|
Uncompress them into the deps folder.
|
||||||
WITH_SSL=<dll or static> - Enable OpenSSL support, DLL or static
|
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_ZLIB=<dll or static> - Enable zlib support, DLL or static
|
||||||
WITH_SSH2=<dll or static> - Enable libSSH2 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
|
ENABLE_SSPI=<yes or no> - Enable SSPI support, defaults to yes
|
||||||
|
@ -21,6 +21,7 @@ CFGSET=true
|
|||||||
!MESSAGE Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/
|
!MESSAGE Libraries can be fetched at http://pecl2.php.net/downloads/php-windows-builds/
|
||||||
!MESSAGE Uncompress them into the deps folder.
|
!MESSAGE Uncompress them into the deps folder.
|
||||||
!MESSAGE WITH_SSL=<dll or static> - Enable OpenSSL support, DLL or static
|
!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_ZLIB=<dll or static> - Enable zlib support, DLL or static
|
||||||
!MESSAGE WITH_SSH2=<dll or static> - Enable libSSH2 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
|
!MESSAGE ENABLE_IDN=<yes or no> - Enable use of Windows IDN APIs, defaults to yes
|
||||||
@ -107,6 +108,14 @@ USE_SSL = true
|
|||||||
SSL = static
|
SSL = static
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(WITH_CARES)"=="dll"
|
||||||
|
USE_CARES = true
|
||||||
|
CARES = dll
|
||||||
|
!ELSEIF "$(WITH_CARES)"=="static"
|
||||||
|
USE_CARES = true
|
||||||
|
CARES = static
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
!IF "$(WITH_ZLIB)"=="dll"
|
!IF "$(WITH_ZLIB)"=="dll"
|
||||||
USE_ZLIB = true
|
USE_ZLIB = true
|
||||||
ZLIB = dll
|
ZLIB = dll
|
||||||
@ -141,6 +150,10 @@ CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-static
|
|||||||
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL)
|
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-ssl-$(SSL)
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(USE_CARES)"=="true"
|
||||||
|
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-cares-$(CARES)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
!IF "$(USE_ZLIB)"=="true"
|
!IF "$(USE_ZLIB)"=="true"
|
||||||
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB)
|
CONFIG_NAME_LIB = $(CONFIG_NAME_LIB)-zlib-$(ZLIB)
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
@ -121,6 +121,27 @@ SSL = static
|
|||||||
SSL_CFLAGS = /DUSE_SSLEAY /I"$(DEVEL_INCLUDE)/openssl"
|
SSL_CFLAGS = /DUSE_SSLEAY /I"$(DEVEL_INCLUDE)/openssl"
|
||||||
!ENDIF
|
!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"
|
!IF "$(WITH_ZLIB)"=="dll"
|
||||||
ZLIB_LIBS = zlib.lib
|
ZLIB_LIBS = zlib.lib
|
||||||
@ -297,6 +318,11 @@ CFLAGS = $(CFLAGS) $(SSL_CFLAGS)
|
|||||||
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(SSL_LIBS)
|
LFLAGS = $(LFLAGS) $(SSL_LFLAGS) $(SSL_LIBS)
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
!IF "$(USE_CARES)"=="true"
|
||||||
|
CFLAGS = $(CFLAGS) $(CARES_CFLAGS)
|
||||||
|
LFLAGS = $(LFLAGS) $(CARES_LFLAGS) $(CARES_LIBS)
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
!IF "$(USE_ZLIB)"=="true"
|
!IF "$(USE_ZLIB)"=="true"
|
||||||
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
|
CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS)
|
||||||
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) $(ZLIB_LIBS)
|
LFLAGS = $(LFLAGS) $(ZLIB_LFLAGS) $(ZLIB_LIBS)
|
||||||
@ -376,6 +402,7 @@ package: $(TARGET)
|
|||||||
|
|
||||||
$(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR)
|
$(TARGET): $(LIB_OBJS) $(LIB_DIROBJ) $(DISTDIR)
|
||||||
@echo Using SSL: $(USE_SSL)
|
@echo Using SSL: $(USE_SSL)
|
||||||
|
@echo Using c-ares: $(USE_CARES)
|
||||||
@echo Using SSH2: $(USE_SSH2)
|
@echo Using SSH2: $(USE_SSH2)
|
||||||
@echo Using ZLIB: $(USE_ZLIB)
|
@echo Using ZLIB: $(USE_ZLIB)
|
||||||
@echo Using IDN: $(USE_IDN)
|
@echo Using IDN: $(USE_IDN)
|
||||||
|
Loading…
Reference in New Issue
Block a user