summaryrefslogtreecommitdiff
path: root/contrib/minizip
diff options
context:
space:
mode:
authorjK <jk3064@arcor.de>2012-03-26 20:18:13 +0200
committerMark Adler <madler@alumni.caltech.edu>2012-03-26 20:17:41 -0700
commitba04838a74202955f7b8dfb66af5345bf5eaeb00 (patch)
treeebd403725ba65473303987053c8df787a16ce24c /contrib/minizip
parent11f4065ea938c503a6c690b66d1503582fdb7a6f (diff)
downloadzlib-ba04838a74202955f7b8dfb66af5345bf5eaeb00.tar.gz
Fix contrib/minizip compilation in the MinGW environment.
Diffstat (limited to 'contrib/minizip')
-rw-r--r--contrib/minizip/Makefile.am11
-rw-r--r--contrib/minizip/configure.ac10
2 files changed, 19 insertions, 2 deletions
diff --git a/contrib/minizip/Makefile.am b/contrib/minizip/Makefile.am
index 2ced913..d343011 100644
--- a/contrib/minizip/Makefile.am
+++ b/contrib/minizip/Makefile.am
@@ -10,11 +10,17 @@ zlib_top_builddir = $(top_builddir)/../..
AM_CPPFLAGS = -I$(zlib_top_srcdir)
AM_LDFLAGS = -L$(zlib_top_builddir)
+if WIN32
+iowin32_src = iowin32.c
+iowin32_h = iowin32.h
+endif
+
libminizip_la_SOURCES = \
ioapi.c \
mztools.c \
unzip.c \
- zip.c
+ zip.c \
+ ${iowin32_src}
libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
@@ -24,7 +30,8 @@ minizip_include_HEADERS = \
ioapi.h \
mztools.h \
unzip.h \
- zip.h
+ zip.h \
+ ${iowin32_h}
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = minizip.pc
diff --git a/contrib/minizip/configure.ac b/contrib/minizip/configure.ac
index 133b369..6a9af21 100644
--- a/contrib/minizip/configure.ac
+++ b/contrib/minizip/configure.ac
@@ -16,6 +16,16 @@ else
AC_MSG_RESULT([no])
fi
+case "${host}" in
+ *-mingw* | mingw*)
+ WIN32="yes"
+ ;;
+ *)
+ ;;
+esac
+AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
+
+
AC_SUBST([HAVE_UNISTD_H], [0])
AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], [])
AC_CONFIG_FILES([Makefile minizip.pc])