Gary V. Vaughan wrote:
Completely untested, but have you tried:
pkglib_LTLIBRARIES = noinst_LTLIBRARIES = if INSTALL_LIBS pkglib_LTLIBRARIES += $(LIBLIST) else noinst_LTLIBRARIES += $(LIBLIST) endif
Just tried it, same results, automake reports each module in LIBLIST as "already going to be installed in 'noinst'". In fact, I even tried changing noinst_ to lib_, and now it reports "already going to be installed in 'lib'".
Argh! No wait, I am a dufus. A noinst_LTLIBRARY is always a convenience library, whereas a pkglib_LTLIBRARY is affected by configure --disable-shared etc. Even if you somehow got past the syntax problems, the semantics are all wrong anyhow.
The only way I can think of doing this is with an install-exec-hook that removes installed libraries if INSTALL_LIBS was not set:
if !INSTALL_LIBS install-exec-hook: $(MAKE) $(AM_MAKEFLAGS) uninstall-pkglibLTLIBRARIES endif
But this depends on an undocumented target. Better to put the modules in a separate dir with their own Makefile.am, and call that Makefile's uninstall rule in the same way.
Cheers, Gary. -- ())_. Gary V. Vaughan gary@(lilith.warpmail.net|gnu.org) ( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____ / )= GNU Hacker http://www.gnu.org/software/libtool \' `& `(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/