linking template libraries (autotools)

i would like to link a program against a library consisting of convenience libraries and those using template functions.
i actually got it WORKING!
-> thanks to Mat and the manual

but: it’s handwork
i would like to use the autotools.

what i do now is:

for the (convenience) libraries add
libaclib_la_CXXFLAGS = --one_instantiation_per_object


then for all the object files do a
pgCC --one_instatiation_per_object --prelink_objects “all other options” *.o

then manually rebuild all libraries
ar cru .libs/libalib.a libalib_la-alib.o .libs/libalib.lax/libaclib.a/libaclib_la-aclib.o Template.dir/q__tm__2_i_db1e5f54.o Template.dir/cq__tm__2__8df8eb98.o

(adding the Temlate.dir objects)

then make the program again
make prog

this time it succeeds…

maybe it would work to set ARFLAGS to Temlate.dir/*.o ?
but i would still need the prelink step!