summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-03-18 11:39:45 +0100
committerDavid Tardon <dtardon@redhat.com>2012-03-18 21:23:41 +0100
commit1f09f96e95a74308fee7a1549234c2c364e55e4f (patch)
treea1018d19254f1aa888a906357ba7850b734ce4f8
parent1118f57582aaa7275a8fe1d1460e1515c111ac2e (diff)
mingw: allow use of system zlib
-rw-r--r--config_host.mk.in4
-rw-r--r--configure.in9
-rw-r--r--external/mingw-dlls/makefile.mk1
-rw-r--r--scp2/source/ooo/makefile.mk4
-rw-r--r--scp2/source/ooo/mingw_dlls.scp6
-rw-r--r--shell/inc/internal/types.hxx7
-rw-r--r--shell/inc/internal/zipfile.hxx6
-rw-r--r--shell/source/win32/ooofilereader/makefile.mk4
-rw-r--r--shell/source/win32/shlxthandler/columninfo/makefile.mk4
-rw-r--r--shell/source/win32/shlxthandler/infotips/makefile.mk4
-rw-r--r--shell/source/win32/shlxthandler/makefile.mk6
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/makefile.mk6
-rw-r--r--shell/source/win32/shlxthandler/prophdl/makefile.mk2
-rw-r--r--shell/source/win32/shlxthandler/propsheets/makefile.mk4
-rw-r--r--shell/source/win32/shlxthandler/util/makefile.mk4
-rw-r--r--shell/source/win32/zipfile/makefile.mk6
-rw-r--r--solenv/inc/libs.mk6
17 files changed, 75 insertions, 8 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index b487e4f48fa3..050417ebbb71 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -301,6 +301,7 @@ export MINGW_LCMS2_DLL=@MINGW_LCMS2_DLL@
export MINGW_LIBXML_DLL=@MINGW_LIBXML_DLL@
export MINGW_LIBXSLT_DLL=@MINGW_LIBXSLT_DLL@
export MINGW_LPSOLVE_DLL=@MINGW_LPSOLVE_DLL@
+export MINGW_MINIZIP_DLL=@MINGW_MINIZIP_DLL@
export MINGW_MYTHES_DLL=@MINGW_MYTHES_DLL@
export MINGW_NEON_DLL=@MINGW_NEON_DLL@
export MINGW_NSPR4_DLL=@MINGW_NSPR4_DLL@
@@ -322,6 +323,8 @@ export MINGW_SSL3_DLL=@MINGW_SSL3_DLL@
export MINGW_SSL_DLL=@MINGW_SSL_DLL@
export MINGW_TASN1_DLL=@MINGW_TASN1_DLL@
export MINGW_ZLIB_DLL=@MINGW_ZLIB_DLL@
+export MINIZIP_CFLAGS=@MINIZIP_CFLAGS@
+export MINIZIP_LIBS=@MINIZIP_LIBS@
export MKDEPENDSOLVER=TRUE
export ML_EXE=@ML_EXE@
export MOC4=@MOC4@
@@ -478,6 +481,7 @@ export SYSTEM_LIBXSLT=@SYSTEM_LIBXSLT@
export SYSTEM_LIBXSLT_FOR_BUILD=@SYSTEM_LIBXSLT_FOR_BUILD@
export SYSTEM_LPSOLVE=@SYSTEM_LPSOLVE@
export SYSTEM_MDDS=@SYSTEM_MDDS@
+export SYSTEM_MINIZIP=@SYSTEM_MINIZIP@
export SYSTEM_MESA_HEADERS=@SYSTEM_MESA_HEADERS@
export SYSTEM_MOZILLA=@SYSTEM_MOZILLA@
export SYSTEM_MOZILLA_HEADERS=@SYSTEM_MOZILLA_HEADERS@
diff --git a/configure.in b/configure.in
index fa5cac5473b0..189ad8702188 100644
--- a/configure.in
+++ b/configure.in
@@ -5738,12 +5738,21 @@ if test "$with_system_zlib" = "yes"; then
[AC_MSG_ERROR(zlib.h not found. install zlib)], [])
AC_CHECK_LIB(z, deflate, [ ZLIB=-lz ],
[AC_MSG_ERROR(zlib not found or functional)], [])
+ if test "$WITH_MINGW" = "yes"; then
+ # we need minizip too
+ PKG_CHECK_MODULES([MINIZIP], [minizip])
+ libo_MINGW_CHECK_DLL([MINIZIP], [libminizip])
+ SYSTEM_MINIZIP=YES
+ fi
else
AC_MSG_RESULT([internal])
SYSTEM_ZLIB=NO
+ SYSTEM_MINIZIP=NO
BUILD_TYPE="$BUILD_TYPE ZLIB"
fi
AC_SUBST(SYSTEM_ZLIB)
+AC_SUBST([SYSTEM_MINIZIP])
+AC_SUBST([MINGW_MINIZIP_DLL])
dnl ===================================================================
dnl Check for system jpeg
diff --git a/external/mingw-dlls/makefile.mk b/external/mingw-dlls/makefile.mk
index 7ca7cacc7dca..d312c346e35b 100644
--- a/external/mingw-dlls/makefile.mk
+++ b/external/mingw-dlls/makefile.mk
@@ -64,6 +64,7 @@ MINGW_DLLS:= \
$(MINGW_LIBXML_DLL) \
$(MINGW_LIBXSLT_DLL) \
$(MINGW_LPSOLVE_DLL) \
+ $(MINGW_MINIZIP_DLL) \
$(MINGW_MYTHES_DLL) \
$(MINGW_NEON_DLL) \
$(MINGW_NSPR4_DLL) \
diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk
index f0ceb8333ab3..ff840f5076c6 100644
--- a/scp2/source/ooo/makefile.mk
+++ b/scp2/source/ooo/makefile.mk
@@ -345,6 +345,10 @@ SCPDEFS += -DNEEDS_MINGW_LIBXSLT_DLL -DMINGW_LIBXSLT_DLL=\""$(MINGW_LIBXSLT_DLL)
SCPDEFS += -DNEEDS_MINGW_LPSOLVE_DLL -DMINGW_LPSOLVE_DLL=\""$(MINGW_LPSOLVE_DLL)"\"
.ENDIF
+.IF "$(MINGW_MINIZIP_DLL)" != ""
+SCPDEFS += -DNEEDS_MINGW_MINIZIP_DLL -DMINGW_MINIZIP_DLL=\""$(MINGW_MINIZIP_DLL)"\"
+.ENDIF
+
.IF "$(MINGW_MYTHES_DLL)" != ""
SCPDEFS += -DNEEDS_MINGW_MYTHES_DLL -DMINGW_MYTHES_DLL=\""$(MINGW_MYTHES_DLL)"\"
.ENDIF
diff --git a/scp2/source/ooo/mingw_dlls.scp b/scp2/source/ooo/mingw_dlls.scp
index 062d4ae3401c..0cd23b3ce8a3 100644
--- a/scp2/source/ooo/mingw_dlls.scp
+++ b/scp2/source/ooo/mingw_dlls.scp
@@ -124,6 +124,12 @@ MINGW_DLL( gid_Brand_File_Lib_Mingw_Libgrahpite, MINGW_GRAPHITE2_DLL )
#endif
#endif
+#ifdef SYSTEM_MINIZIP
+#ifdef NEEDS_MINGW_MINIZP_DLL
+MINGW_DLL( gid_Brand_File_Lib_Mingw_Libminizip, MINGW_MINIZIP_DLL )
+#endif
+#endif
+
#ifdef SYSTEM_NEON
#ifdef NEEDS_MINGW_TASN1_DLL
MINGW_DLL( gid_Brand_File_Lib_Mingw_Libtasn, MINGW_TASN1_DLL )
diff --git a/shell/inc/internal/types.hxx b/shell/inc/internal/types.hxx
index a806d02768dd..0c6810aec0d0 100644
--- a/shell/inc/internal/types.hxx
+++ b/shell/inc/internal/types.hxx
@@ -34,9 +34,14 @@
#include <utility>
#include <vector>
#include <stack>
+
+#if defined SYSTEM_ZLIB
+#include <zlib.h>
+#include <minizip/ioapi.h>
+#else
#include <external/zlib/zlib.h>
#include <external/zlib/ioapi.h>
-
+#endif
typedef std::vector<std::wstring> StringList_t;
diff --git a/shell/inc/internal/zipfile.hxx b/shell/inc/internal/zipfile.hxx
index 6d8d24b0538c..062ce38cf1af 100644
--- a/shell/inc/internal/zipfile.hxx
+++ b/shell/inc/internal/zipfile.hxx
@@ -33,9 +33,11 @@
#define _WINDOWS
#endif
-
+#if defined SYSTEM_ZLIB
+#include <minizip/unzip.h>
+#else
#include <external/zlib/unzip.h>
-
+#endif
#include <string>
#include <vector>
diff --git a/shell/source/win32/ooofilereader/makefile.mk b/shell/source/win32/ooofilereader/makefile.mk
index 6b9d1efe3664..b26e10a16795 100644
--- a/shell/source/win32/ooofilereader/makefile.mk
+++ b/shell/source/win32/ooofilereader/makefile.mk
@@ -47,6 +47,10 @@ CFLAGS_X64+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
.ENDIF
CDEFS_X64+=-U_WIN32_IE -D_WIN32_IE=0x501 -U_WIN32_WINNT -D_WIN32_WINNT=0x0501
+.IF "$(SYSTEM_ZLIB)" == "YES"
+CDEFS += -DSYSTEM_ZLIB
+.END
+
# --- Files --------------------------------------------------------
diff --git a/shell/source/win32/shlxthandler/columninfo/makefile.mk b/shell/source/win32/shlxthandler/columninfo/makefile.mk
index 31c019f31f76..7157f8f6ae2b 100644
--- a/shell/source/win32/shlxthandler/columninfo/makefile.mk
+++ b/shell/source/win32/shlxthandler/columninfo/makefile.mk
@@ -42,6 +42,10 @@ CFLAGS+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
.ENDIF
CDEFS+=-U_WIN32_IE -D_WIN32_IE=0x501 -U_WIN32_WINNT -D_WIN32_WINNT=0x0501
+.IF "$(SYSTEM_ZLIB)" == "YES"
+CDEFS += -DSYSTEM_ZLIB
+.END
+
# --- Files --------------------------------------------------------
SLOFILES=$(SLO)$/columninfo.obj
diff --git a/shell/source/win32/shlxthandler/infotips/makefile.mk b/shell/source/win32/shlxthandler/infotips/makefile.mk
index e7caf3afd244..38126a54c697 100644
--- a/shell/source/win32/shlxthandler/infotips/makefile.mk
+++ b/shell/source/win32/shlxthandler/infotips/makefile.mk
@@ -42,6 +42,10 @@ CFLAGS+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
.ENDIF
CDEFS+=-U_WIN32_IE -D_WIN32_IE=0x501 -U_WIN32_WINNT -D_WIN32_WINNT=0x0501
+.IF "$(SYSTEM_ZLIB)" == "YES"
+CDEFS += -DSYSTEM_ZLIB
+.END
+
# --- Files --------------------------------------------------------
SLOFILES=$(SLO)$/$(TARGET).obj
diff --git a/shell/source/win32/shlxthandler/makefile.mk b/shell/source/win32/shlxthandler/makefile.mk
index b02a27838754..fa2a480dbff6 100644
--- a/shell/source/win32/shlxthandler/makefile.mk
+++ b/shell/source/win32/shlxthandler/makefile.mk
@@ -59,6 +59,10 @@ CDEFS+=-DDONT_HAVE_GDIPLUS
CDEFS+=-U_WIN32_IE -D_WIN32_IE=0x501 -U_WIN32_WINNT -D_WIN32_WINNT=0x0501
+.IF "$(SYSTEM_ZLIB)" == "YES"
+CDEFS += -DSYSTEM_ZLIB
+.END
+
# --- Files --------------------------------------------------------
SLOFILES=$(SLO)$/classfactory.obj\
@@ -73,7 +77,7 @@ SLOFILES=$(SLO)$/classfactory.obj\
SHL1TARGET=$(TARGET)
.IF "$(COM)"=="GCC"
-SHL1STDLIBS=$(ZLIB3RDLIB) $(EXPAT3RDLIB) $(COMCTL32LIB)
+SHL1STDLIBS=$(ZLIB3RDLIB) $(MINIZIP3RDLIB) $(EXPAT3RDLIB) $(COMCTL32LIB)
SHL1LIBS=
.ELSE
SHL1STDLIBS=
diff --git a/shell/source/win32/shlxthandler/ooofilt/makefile.mk b/shell/source/win32/shlxthandler/ooofilt/makefile.mk
index 1748f46df112..afb2988bb12c 100644
--- a/shell/source/win32/shlxthandler/ooofilt/makefile.mk
+++ b/shell/source/win32/shlxthandler/ooofilt/makefile.mk
@@ -46,6 +46,10 @@ CFLAGS+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
.ENDIF
CDEFS+=-U_WIN32_IE -D_WIN32_IE=0x501 -U_WIN32_WINNT -D_WIN32_WINNT=0x0501
+.IF "$(SYSTEM_ZLIB)" == "YES"
+CDEFS += -DSYSTEM_ZLIB
+.END
+
# --- Files --------------------------------------------------------
SLOFILES=$(SLO)$/ooofilt.obj\
@@ -54,7 +58,7 @@ SLOFILES=$(SLO)$/ooofilt.obj\
SHL1TARGET=$(TARGET)
.IF "$(COM)"=="GCC"
-SHL1STDLIBS=$(ZLIB3RDLIB) $(EXPAT3RDLIB)
+SHL1STDLIBS=$(ZLIB3RDLIB) $(MINIZIP3RDLIB) $(EXPAT3RDLIB)
SHL1LIBS=
.ELSE
SHL1STDLIBS=
diff --git a/shell/source/win32/shlxthandler/prophdl/makefile.mk b/shell/source/win32/shlxthandler/prophdl/makefile.mk
index 64d83a68a4bd..8a6813a616fb 100644
--- a/shell/source/win32/shlxthandler/prophdl/makefile.mk
+++ b/shell/source/win32/shlxthandler/prophdl/makefile.mk
@@ -63,7 +63,7 @@ SLOFILES=$(SLO)$/$(TARGET).obj\
SHL1TARGET=$(TARGET)
.IF "$(COM)"=="GCC"
-SHL1STDLIBS=$(ZLIB3RDLIB) $(EXPAT3RDLIB) $(COMCTL32LIB)
+SHL1STDLIBS=$(ZLIB3RDLIB) $(MINIZIP3RDLIB) $(EXPAT3RDLIB) $(COMCTL32LIB)
SHL1LIBS=
.ELSE
SHL1STDLIBS=
diff --git a/shell/source/win32/shlxthandler/propsheets/makefile.mk b/shell/source/win32/shlxthandler/propsheets/makefile.mk
index 5b4405fd90cf..1d67510852fa 100644
--- a/shell/source/win32/shlxthandler/propsheets/makefile.mk
+++ b/shell/source/win32/shlxthandler/propsheets/makefile.mk
@@ -44,6 +44,10 @@ CFLAGS_X64+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
CDEFS_X64+=-U_WIN32_IE -D_WIN32_WINNT=0x0501 -U_WIN32_WINNT -D_WIN32_IE=0x501
.ENDIF
+.IF "$(SYSTEM_ZLIB)" == "YES"
+CDEFS += -DSYSTEM_ZLIB
+.END
+
# --- Files --------------------------------------------------------
SLOFILES=$(SLO)$/propsheets.obj\
diff --git a/shell/source/win32/shlxthandler/util/makefile.mk b/shell/source/win32/shlxthandler/util/makefile.mk
index f2edb7f3719e..e2b7a8294319 100644
--- a/shell/source/win32/shlxthandler/util/makefile.mk
+++ b/shell/source/win32/shlxthandler/util/makefile.mk
@@ -47,6 +47,10 @@ CFLAGS_X64+=-wd4710 -wd4711 -wd4514 -wd4619 -wd4217 -wd4820
.ENDIF
CDEFS_X64+=-U_WIN32_IE -D_WIN32_IE=0x501 -U_WIN32_WINNT -D_WIN32_WINNT=0x0501
+.IF "$(SYSTEM_ZLIB)" == "YES"
+CDEFS += -DSYSTEM_ZLIB
+.END
+
# --- Files --------------------------------------------------------
SLOFILES=$(SLO)$/fileextensions.obj\
diff --git a/shell/source/win32/zipfile/makefile.mk b/shell/source/win32/zipfile/makefile.mk
index 93fdf6602ae4..0e165dd01faa 100644
--- a/shell/source/win32/zipfile/makefile.mk
+++ b/shell/source/win32/zipfile/makefile.mk
@@ -31,12 +31,14 @@ TARGET=zipfile
ENABLE_EXCEPTIONS=TRUE
EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-
-
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
+.IF "$(SYSTEM_ZLIB)" == "YES"
+CDEFS += -DSYSTEM_ZLIB
+.END
+
# --- Files --------------------------------------------------------
diff --git a/solenv/inc/libs.mk b/solenv/inc/libs.mk
index 55bf2bfd5a6e..3adeb01d3a0e 100644
--- a/solenv/inc/libs.mk
+++ b/solenv/inc/libs.mk
@@ -198,6 +198,12 @@ ZLIB3RDLIB=-lz
.ELSE
ZLIB3RDLIB=-lzlib
.ENDIF
+.IF "$(SYSTEM_MINIZIP)"=="YES"
+MINIZIP3RDLIB=$(MINIZIP_LIBS)
+.ELSE
+# internally, minizip is included in zlib
+MINIZIP3RDLIB=
+.ENDIF
.IF "$(SYSTEM_JPEG)"=="YES"
JPEG3RDLIB=-ljpeg
.ELSE