It seems that whenever a wrapper executable is built for cygwin/mingw, libraries passed to libtool are ignored.
# The wrapper executable is built using the $host compiler,
# because it contains $host paths and files. If cross-
# compiling, it, like the target executable, must be
# executed on the $host or under an emulation environment.
$opt_dry_run || {
$LTCC $LTCFLAGS -o $cwrapper $cwrappersource
$STRIP $cwrapper
}
and clearly there's something missing after cwrappersource. In my project, I'm currently just using sed to patch the libtool, but a variable like LTLIBS would be useful.
--