11.1. Using Libtool Libraries

As you have seen, it is very easy to convert automake-built static libraries to automake-built Libtool libraries. To build 'libsic' as a Libtool library, I have changed the name of the library from 'libsic.a' (the old archive name in Libtool terminology) to 'libsic.la' (the pseudo library), and must use the LTLIBRARIES Automake primary:

lib_LTLIBRARIES         = libsic.la
libsic_la_SOURCES       = builtin.c error.c eval.c list.c sic.c \
                        syntax.c xmalloc.c xstrdup.c xstrerror.c

Notice the 'la' in libsic_la_SOURCES is new too.

It is similarly easy to take advantage of Libtool convenience libraries. For the purposes of Sic, 'libreplace' is an ideal candidate for this treatment—I can create the library as a separate entity from ...

Get GNU Autoconf, Automake, and Libtool now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.