Bruno Haible <br...@clisp.org> writes:

> Hi Simon, Ralf,
>
> 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.

> 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?

/Simon


Reply via email to