* Simon Josefsson wrote on Wed, Apr 01, 2009 at 06:50:07AM CEST: > Bruno Haible <br...@clisp.org> writes: > > Your documented example looks like this: > > > >> +if HAVE_LD_OUTPUT_DEF > >> +libfoo_la_LDFLAGS += -Wl,--output-def,libfoo-$(SOVERSION).def > >> +defexecdir = $(bindir) > >> +defexec_DATA = libfoo-$(SOVERSION).def > >> +DISTCLEANFILES += $(defexec_DATA) > >> +endif > > > > What is $(SOVERSION) ? As I understand it, libfoo-$(SOVERSION).def should > > match the basename of libfoo-$(SOVERSION).dll, right? But that basename is > > determined by libtool from the L:T:V triple that gets passed as > > -version-info argument, in an undocumented (platform dependent) way. > > I forgot this aspect. The application needs to compute the SOVERSION > field from the values passed to libtool. Assuming the projects uses: > > AC_SUBST(LT_CURRENT, 1) > AC_SUBST(LT_REVISION, 1) > AC_SUBST(LT_AGE, 0) > ... > libgss_la_LDFLAGS = -no-undefined \ > -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) > > It can compute the SOVERSION value as follows: > > SOVERSION=`expr ${LT_CURRENT} - ${LT_AGE}` > AC_SUBST(SOVERSION) > > I'll include this in an updated version of the patch.
But this requires the user to know the particular version computation for this one system. Worse even, the generic name `SOVERSION' easily implies to the naive user that this version holds for all systems this package may be built upon. That can't be sensible. > > Right? Then, the --output-def functionality should be available > > through libtool. We are not supposed to define and update manually an > > SOVERSION macro that is actually the result of some computations done by > > libtool. > > DEF files are only relevant for windows targets, so I don't see any > point in having this functionality in libtool? I don't understand this argument. AIUI you won't be using this functionality without libtool at all anyway, right? But even if, the above is an argument *for* including this functionality in libtool. I think all the functionality you need is contained in the pr-msvc-support branch of git Libtool. Can you check whether that is sufficient for you? Thanks, Ralf