Il 20/11/2013 09:47, Torbjorn Granlund ha scritto: > Christian Rössel <christian.roes...@gmx.de> writes: > > assuming that you are using libtool, just configure twice, with > --enable-static --disable-shared' and '--disable-static > --enable-shared' respectively. Maybe this is not the solution you are > looking for, but it is an easy workaround that is trivial to automate; > and you don't have to touch any Makefile.am. > > We do just that for our (automated) own testing. We cannot tell end > users to do that. (Or, we sure can, but they won't do it, > realistically.)
Compile the tests twice, add "--tag disable-shared" to the linker flags of the second copy. Something like check_TESTS = test-add test-add-static \ test-sub test-sub-static ... test_add_static_LDFLAGS = $(LDFLAGS) --tag disable-shared test_add_static_LDADD = ../path/to/lib.la test_sub_static_LDFLAGS = $(LDFLAGS) --tag disable-shared test_sub_static_LDADD = ../path/to/lib.la ... Paolo