Check for existence of import and static libraries with documented names
and use them if they do. Fallback to previous names.
According to
https://github.com/madler/zlib/blob/master/win32/README-WIN32.txt on
Windows, the names of the import library is "zdll.lib" and static
library is "zlib.lib".
closes #2354
CARES_CFLAGS = /DUSE_ARES /I"$(DEVEL_INCLUDE)/cares"\r
!ENDIF\r
\r
+# Depending on how zlib is built the libraries have different names, we \r
+# try to handle them all. \r
!IF "$(WITH_ZLIB)"=="dll"\r
+!IF EXISTS("$(DEVEL_LIB)\zlibwapi.lib")\r
+ZLIB_LIBS = zlibwapi.lib\r
+!ELSEIF EXISTS("$(DEVEL_LIB)\zdll.lib")\r
+ZLIB_LIBS = zdll.lib\r
+!ELSE\r
ZLIB_LIBS = zlib.lib\r
+!ENDIF\r
USE_ZLIB = true\r
ZLIB = dll\r
!ELSEIF "$(WITH_ZLIB)"=="static"\r
+!IF EXISTS("$(DEVEL_LIB)\zlibstat.lib")\r
+ZLIB_LIBS = zlibstat.lib\r
+!ELSEIF EXISTS("$(DEVEL_LIB)\zlib.lib")\r
+ZLIB_LIBS = zlib.lib\r
+!ELSE\r
ZLIB_LIBS = zlib_a.lib\r
+!ENDIF\r
USE_ZLIB = true\r
ZLIB = static\r
!ENDIF\r