GNU Libtool

{{Short description|Shared library creation tool from GNU}}

{{more citations needed|date=November 2010}}

{{infobox software

| name = GNU Libtool

| logo = frameless

| developer = GNU Project{{cite web|url=http://directory.fsf.org/wiki/GNU|title=GNU|accessdate=25 June 2012}}

| released = {{Start date and age|1997|07|09}}

| operating_system = Cross-platform

| genre = Library

| license = GPLv2

| website = {{URL|https://www.gnu.org/software/libtool/}}

}}

GNU Libtool is a software development tool, part of the GNU build system, consisting of a shell script{{cite book |author= |title=The GNU Libtool manual |url=https://www.gnu.org/software/libtool/manual/libtool.html#Postmortem |date=2015-02-15 |publisher=The GNU project |chapter=A postmortem analysis of other implementations |chapter-url=https://www.gnu.org/software/libtool/manual/html_node/Postmortem.html |accessdate=2021-02-02}} created to address the software portability problem when compiling shared libraries from source code.

It hides the differences between computing platforms for the commands which compile shared libraries.{{cite book |author= |title=The GNU Libtool manual |url=https://www.gnu.org/software/libtool/manual/libtool.html#Introduction |date=2015-02-15 |publisher=The GNU project |chapter=Introduction |chapter-url=https://www.gnu.org/software/libtool/manual/html_node/Introduction.html |accessdate=2021-02-02}}

It provides a command-line interface that is identical across platforms and it executes the platform's native commands, allowing software authors to offer build support for their code across many diverse platforms such as Linux, BSD variants, Windows (via Cygwin), HP-UX, Solaris (including on SPARC processors), AIX, and IRIX.{{cite book |author= |title=The GNU Libtool manual |url=https://www.gnu.org/software/libtool/manual/libtool.html#Tested-platforms |date=2015-02-15 |publisher=The GNU project |chapter=Tested platforms |chapter-url=https://www.gnu.org/software/libtool/manual/html_node/Tested-platforms.html |accessdate=2025-06-07}}

Rationale

Different operating systems handle shared libraries differently.

Some platforms do not use shared libraries at all.

It can be difficult to make a software program portable: the C compiler differs from system to system; certain library functions are missing on some systems; header files may have different names.

Libtool helps manage the creation of static and dynamic libraries on various Unix-like operating systems.

Libtool accomplishes this by abstracting the library-creation process, hiding differences between various systems (e.g. Linux systems vs. Solaris).

GNU Libtool is designed to simplify the process of compiling a computer program on a new system, by "encapsulating both the platform-specific dependencies, and the user interface, in a single script".

[https://www.gnu.org/software/libtool/manual/libtool.html Libtool Manual]

When porting a program to a new system, Libtool is designed so the porter need not read low-level documentation for the shared libraries to be built, rather just run a configure script (or equivalent).

Use

Libtool is used by Autoconf and Automake, two other portability tools in the GNU build system.

It can also be used directly.

{{cite book |author= |title=The GNU Libtool manual |url=https://www.gnu.org/software/libtool/manual/libtool.html#Makefile-rules |date=2015-02-15 |publisher=The GNU project |chapter=Writing Makefile rules for libtool |chapter-url=https://www.gnu.org/software/libtool/manual/html_node/Makefile-rules.html |accessdate=2021-02-02}}

Clones and derivatives

Since GNU Libtool was released, other free software projects have created drop-in replacements under different software licenses.[http://BXR.SU/OpenBSD/usr.bin/libtool/ BSD-licensed libtool]. [https://git.foss21.org/slibtool slibtool] is one such implementation.{{Cite web |title=Slibtool - Gentoo wiki |url=https://wiki.gentoo.org/wiki/Slibtool |access-date=2024-03-11 |website=wiki.gentoo.org}}

See also

{{Portal|Free and open-source software}}

  • {{Annotated link|GNU Compiler Collection}}
  • {{Annotated link|pkg-config}}

References

{{reflist}}