Add libtool use to autotools package

Brian Inglis
Sun Nov 7 19:15:46 GMT 2021

On 2021-11-07 11:40, Roumen Petrov wrote:
> Hello Brian,
> Brian Inglis wrote:
>> Hi folks,
>> I am trying to port:
>> [SNIP]
>> Should I run libtoolize with all defaults in the source package src 
>> directory and/or the x11 subdirectory?
> Run libtoolize in directory if exist that uses libtool.
> You may will to redirect project to use common "macro" directory.
> Something like :
> - top
> - || in foo/bar
> |||AC_CONFIG_MACRO_DIR([../../m4])
> Remark: if subdir uses or prefer to use ||||||AC_CONFIG_MACRO_DIR([m4]) 
> run ||||||||libtoolize as well.
> ||||
>> Should I add LT_INIT to
> Yes if you want to use libtool.
> No if is used AC_PROG_LIBTOOL but you may consider upgrade of macros.
>> Should I add parameter [win32-dll]?
> If project uses AC_LIBTOOL_WIN32_DLL you may consider to upgrade to 
> macro, i.e.  LT_INIT([.... win32-dll ...])
> If I remember well libtool  required to add -no-undefinedto LDFLAGS of 
> binary.
> Sorry but I forgot needs for "win32-dll". It seems to me harmless.
>> Should I add ABI age and current version info and where to?
> It depends from use.
> If is a loadable module you could use  -avoid-version to skip versioning 
> and -module to remove "lib".
> For windows (mingw* or cygwin*) builds I don't think that libtool 
> version scheme makes sense.
>> Are there other files that need to be manually added or modified for 
>> libtool to work?
> This is project dependent.
>> Is there an approach documented somewhere for converting Linux library 
>> commands to generic libtool commands?
> Question is not clear to me.
> Lbtool documentation point how to use libtool to compile, link, install 
> and etc. Actually this is way to write make "targets" that use libtool.
> But if project uses automake there no need to know particular invocation.

Thanks Roumen,

Those hints will help a lot in getting me started with libtool.

The last point is because has a variety of its own 
definitions and rules with SHO, SHL, and DYN e.g.



	$(LD_RXLIB1) -o $@ $(SHOFILES) $(LD_RXLIB2)
sb.sho: $(osdir)/sb.c
	$(DYN_BUILD) $(osdir)/sb.c

Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

More information about the Cygwin mailing list