I tried to compile latest version of FLAC with MINGW+MSYS.
Here you are the fixes that I would like to suggest:
- Added into configure.in the ability to compile DLL with --enable-shared.
For this purpose I added, in addition to AC_LIBTOOL_WIN32_DLL, a macro called LT_NO_UNDEFINED that's used for adding the "-no-undefined" parameter to libtool when Windows host is detected.
For building LibFLAC-8.dll I had also to add the dependency to WinSock, because ntohs() function.
- I got an error because both SIZE_MAX and SIZE_T_MAX were undefined.
The error comes from /include/shares/alloc.h because stdint.h was not included.
Actually there was a real work-around made for by-passing the inclusion of stdint.h with Mingw32.
I was not able to understand the reasons of this limitation, but I was forced to remove that for getting it compilable.
So I just surrounded it with the HAVE_STDINT_H macro, which should make it working on all platforms.
stdint.h also exists into the latest Microsoft SDK, so it will work on MSVC too even if HAVE_STDINT_H is defined.
- I had also another problem which is not covered by currently attached patch.
I had to upgrade these files to a newer version:
otherwise the compilation, especially when creating the libraries, becomed crazy and it failed.