Closed brong closed 13 years ago
From: Patrick Welche
"make install" fails with
/bin/ksh ../libtool --mode=install /usr/bin/install -c 'libsasldb.la' '/usr/local/lib/sasl2/libsasldb.la' /usr/bin/install -c .libs/libsasldb.lai /usr/local/lib/sasl2/libsasldb.la install: .libs/libsasldb.lai: stat: No such file or directory
This is because plugins/Makefile.am correctly sets -module and -rpath flags in
AM_LDFLAGS = -module -export-dynamic -rpath $(plugindir)
but then overrides these flags for every plugin with e.g.,
libplain_la_LDFLAGS = -version-info $(plain_version)
The plugins are then built without -module or -rpath, so libtool considers them to be convenience libraries which shouldn't be installed.
The attachment fixes this, and simplifies the makefile, as the plugins' version is always the same.
From: Patrick Welche
Ralf Wildenhues pointed out that this is because of a change of behaviour in automake 1.10 - the patch still is correct either way though!
Per-target flags are now correctly handled in link rules.
For instance maude_CFLAGS correctly overrides AM_CFLAGS; likewise for maude_LDFLAGS and AM_LDFLAGS. Previous versions bogusly preferred AM_CFLAGS over maude_CFLAGS while linking, and they used both AM_LDFLAGS and maude_LDFLAGS on the same link command.
The fix for compiler flags (i.e., using maude_CFLAGS instead of AM_CFLAGS) should not hurt any package since that is how _CFLAGS is expected to work (and actually works during compilation).
However using maude_LDFLAGS "instead of" AM_LDFLAGS rather than "in addition to" breaks backward compatibility with older versions. If your package used both variables, as in
AM_LDFLAGS = common flags bin_PROGRAMS = a b c a_LDFLAGS = more flags ...
and assumed *_LDFLAGS would sum up, you should rewrite it as
AM_LDFLAGS = common flags bin_PROGRAMS = a b c a_LDFLAGS = $(AM_LDFLAGS) more flags ...
This new behavior of _LDFLAGS is more coherent with other per-target variables, and the way _LDFLAGS variables were considered internally.
Attachment-Id: 1016 From: Patrick Welche Type: text/plain File: plugin.diff
patch to Makefile.am
From: Ken Murchison
Bug 3076 has been marked as a duplicate of this bug.
From: Patrick Welche Bugzilla-Id: 3082 Version: 2.1.x Owner: Ken Murchison