manpagez: man pages & more
info libtool
Home | html | info | man

File: libtool.info,  Node: Tags,  Prev: C++ libraries,  Up: Other languages

6.2 Tags
========

Libtool supports multiple languages through the use of tags.
Technically a tag corresponds to a set of configuration variables
associated with a language.  These variables tell ‘libtool’ how it
should create objects and libraries for each language.

   Tags are defined at ‘configure’-time for each language activated in
the package (see ‘LT_LANG’ in *note LT_INIT::).  Here is the
correspondence between language names and tags names.

Language name      Tag name
C                  CC
C++                CXX
Java               GCJ
Fortran 77         F77
Fortran            FC
Go                 GO
Windows Resource   RC

   ‘libtool’ tries to automatically infer what tag to use from the
compiler command being used to compile or link.  If it can't infer a
tag, then it defaults to the configuration for the ‘C’ language.

   The tag can also be specified using ‘libtool’'s ‘--tag=TAG’ option
(*note Invoking libtool::).  It is a good idea to do so in ‘Makefile’
rules, because that will allow users to substitute the compiler without
relying on ‘libtool’ inference heuristics.  When no tag is specified,
‘libtool’ will default to ‘CC’; this tag always exists.

   Finally, the set of tags available in a particular project can be
retrieved by tracing for the ‘LT_SUPPORTED_TAG’ macro (*note Trace
interface::).

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.