Subject: bug#11155: when cross-compiling with LT_INIT([win32-dll]) wrappers are installed instead of real programs

From: Marcin Wojdyr <[email-masked]>
Date: Mon, 2 Apr 2012 19:27:56 +0100

automake 1.11.1, autoconf 2.68, libtool 2.4, Fedora 16

I'm cross-compiling a project that has LT_INIT([win32-dll]) and has
programs as well as libraries.
After "make" I have programs (.exe) as well as libraries in .libs/

"make install" installs libraries from .libs:
libtool: install:  /usr/bin/install -c
.libs/libDiffImage-0../bin/libDiffImage-0.dll

but instead of installing programs from .libs/ it installs wrappers
from current directory.
Apparently these wrappers on windows are small ~30kb executables.

$ ls -l automask.exe .libs/automask.exe
-rwxrwxr-x. 1 wojdyr wojdyr  27136 04-02 19:14 automask.exe
-rwxrwxr-x. 1 wojdyr wojdyr 112544 04-02 19:14 .libs/automask.exe

They are installed instead of real programs:

test -z "/run/mw/foo/bin" || /bin/mkdir -p "/run/mw/foo/bin
  /bin/sh ./libtool   --mode=install /usr/bin/install -c automask.exe
diffdump.exe printpeaks.exe diff2jpeg.exe '/run/mw/foo/bin'
libtool: install: /usr/bin/install -c automask.exe /run/mw/foo/bin/automask.exe