Skip to content
This repository
Browse code

Fix contrib/minizip compilation in the MinGW environment.

  • Loading branch information...
commit ba04838a74202955f7b8dfb66af5345bf5eaeb00 1 parent 11f4065
jk3064 authored March 26, 2012 madler committed March 26, 2012
11  contrib/minizip/Makefile.am
@@ -10,11 +10,17 @@ zlib_top_builddir = $(top_builddir)/../..
10 10
 AM_CPPFLAGS = -I$(zlib_top_srcdir)
11 11
 AM_LDFLAGS = -L$(zlib_top_builddir)
12 12
 
  13
+if WIN32
  14
+iowin32_src = iowin32.c
  15
+iowin32_h = iowin32.h
  16
+endif
  17
+
13 18
 libminizip_la_SOURCES = \
14 19
 	ioapi.c \
15 20
 	mztools.c \
16 21
 	unzip.c \
17  
-	zip.c
  22
+	zip.c \
  23
+	${iowin32_src}
18 24
 
19 25
 libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz
20 26
 
@@ -24,7 +30,8 @@ minizip_include_HEADERS = \
24 30
 	ioapi.h \
25 31
 	mztools.h \
26 32
 	unzip.h \
27  
-	zip.h
  33
+	zip.h \
  34
+	${iowin32_h}
28 35
 
29 36
 pkgconfigdir = $(libdir)/pkgconfig
30 37
 pkgconfig_DATA = minizip.pc
10  contrib/minizip/configure.ac
@@ -16,6 +16,16 @@ else
16 16
 	AC_MSG_RESULT([no])
17 17
 fi
18 18
 
  19
+case "${host}" in
  20
+	*-mingw* | mingw*)
  21
+		WIN32="yes"
  22
+		;;
  23
+	*)
  24
+		;;
  25
+esac
  26
+AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
  27
+
  28
+
19 29
 AC_SUBST([HAVE_UNISTD_H], [0])
20 30
 AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], [])
21 31
 AC_CONFIG_FILES([Makefile minizip.pc])

0 notes on commit ba04838

Please sign in to comment.
Something went wrong with that request. Please try again.