ZZIPLIB does not configure and compile well on Windows under mingw+msys.
When configuring the library, I get those messages:
[--- CUT --]
checking windows.h usability... yes
checking windows.h presence... yes
checking for windows.h... yes
checking winnt.h usability... no
checking winnt.h presence... yes
configure: WARNING: winnt.h: present but cannot be compiled
configure: WARNING: winnt.h: check for missing prerequisite headers?
configure: WARNING: winnt.h: see the Autoconf documentation
configure: WARNING: winnt.h: section "Present But Cannot Be Compiled"
configure: WARNING: winnt.h: proceeding with the compiler's result
checking for winnt.h... no
checking winbase.h usability... no
checking winbase.h presence... yes
configure: WARNING: winbase.h: present but cannot be compiled
configure: WARNING: winbase.h: check for missing prerequisite headers?
configure: WARNING: winbase.h: see the Autoconf documentation
configure: WARNING: winbase.h: section "Present But Cannot Be Compiled"
configure: WARNING: winbase.h: proceeding with the compiler's result
checking for winbase.h... no
[--- CUT --]
checking sys/mman.h usability... no
checking sys/mman.h presence... no
checking for sys/mman.h... no
[--- CUT --]
enable mmap (yes, sys/mman.h)
[--- CUT --]
Testing for winbase.h and winnt.h is a nonsense, since an user does not need to know what there is inside windows.h.
If, for some reasons, you would like to avoid some stuff like RPC, shell API, GDI, etc, you can use the configuration macros like WIN32_LEAN_AND_MEAN, NOGDI, NO_STRICT, etc.
I added WIN32_LEAN_AND_MEAN since we must say that there is lot of stuff not required by ZZIPLIB, which is a good idea for increasing the portability.
Anyways, at the end of the configuration script, it always printed "yes, sys/mman.h", even after that I corrected the detection.
So, I looked again in configure.ac and I fixed the assignment to $enable_mmap.
After that, I was able to start the compilation, but it failed to link dynamic libraries.
Again in configure.ac, I discovered that ZZIPLIB_LDFLAGS was wrong: flags like "-no-undefined" are libtool flags and not linker flags.
After removing the "-Wl," prefix, the library finally compiled successfully.
Attached patch fixes all listed issues.
Sincerely,
Carlo Bramini.
Fix for this bug.