In latest stable SDL release for MinGW (
http://www.libsdl.org/release/SDL-devel-1.2.13-mingw32.tar.gz )
sdl-config provides following arguments for linker:
–libs)
echo -L${exec_prefix}/lib -lmingw32 -lSDLmain -lSDL -mwindows
;;
–static-libs)
–libs|–static-libs)
echo -L${exec_prefix}/lib -lmingw32 -lSDLmain -lSDL -mwindows
;;
This may be fine for MinGW/cmd, but it’s a pure horror for MinGW/MSys.
Because conftest for sdl is an executable and has to be linked WITH
static libraries (-lmingw32 and -lSDLmain) to satisfy WinMain at 16
dependency, while actual project being built may not be an executable
(for example - sdlvideosink from gst-plugins-bad) and when it is so it
should be built WITHOUT static libraries, else libtool complains that it
can’t link static libraries to a shared library and refuses to link it
together.
P.S. There’s no sdl.pc in that release either. It’s ok for projects that
are aware of sdl-config, but some of them may not be.