* Inter-library dependencies:: Libraries that depend on other libraries.
* Dlopened modules:: @code{dlopen}ing libtool-created libraries.
* Using libltdl:: Libtool's portable @code{dlopen} wrapper library.
+* Trace interface:: Libtool's trace interface.
* Troubleshooting:: When libtool doesn't work as advertised.
* Maintaining:: Information used by the libtool maintainer.
* GNU Free Documentation License:: License for this manual.
Including libtool in your package
* Invoking libtoolize:: @code{libtoolize} command line options.
-* Autoconf and LTLIBOBJS:: Autoconf automates LTLIBOBJ generation.
+* Autoconf and LTLIBOBJS:: Autoconf automates LTLIBOBJS generation.
+
+Using libtool with other languages
+
+* C++ libraries::
+* Tags:: Using Tags.
Library interface versions
* Libltdl interface:: How to use libltdl in your programs.
* Modules for libltdl:: Creating modules that can be @code{dlopen}ed.
-* Thread Saftey in libltdl:: Registering callbacks for multi-thread safety.
+* Thread Safety in libltdl:: Registering callbacks for multi-thread safety.
* User defined module data:: Associating data with loaded modules.
* Module loaders for libltdl:: Creating user defined module loaders.
* Distributing libltdl:: How to distribute libltdl with your package.
-Using libtool with other languages
-
-* C++ libraries::
-
Troubleshooting
* Libtool test suite:: Libtool's self-tests.
* References:: Finding more information.
* Compilers:: Creating object files from source files.
* Reloadable objects:: Binding object files together.
-* Multiple dependencies:: Removing duplicate dependent libraries.
+* Multiple dependencies:: Removing duplicate dependent libraries.
* Archivers:: Programs that create static archives.
@end detailmenu
Delete uninstalled libraries or executables.
@end table
+@item --tag=@var{tag}
+Use configuration variables from tag @var{tag} (@pxref{Tags}).
+
@item --preserve-dup-deps
Do not remove duplicate dependencies in libraries. When building packages
with static libraries, the libraries may depend circularly on each other
@menu
* C++ libraries::
+* Tags::
@end menu
@node C++ libraries
compiled with the C++ compiler for static C++ objects to be properly
initialized.
+@node Tags
+@section Tags
+@cindex tag names
+@cindex language names
+@cindex inferring 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 @command{libtool} how it should create
+objects and libraries for each language.
+
+Tags are defined at @command{configure}-time for each language activated
+in the package (see @code{LT_LANG} in @ref{LT_INIT}). Here is the
+correspondence between language names and tags names.
+
+@multitable {Windows Resource} {Tag name}
+@item Language name @tab Tag name
+@item C @tab
+@item C++ @tab CXX
+@item Java @tab GCJ
+@item Fortran 77 @tab F77
+@item Windows Resource @tab RC
+@end multitable
+
+@command{libtool} tries to automatically infer which 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 @code{C} language.
+
+The tag can also be specified using @command{libtool}'s
+@code{--tag=@var{tag}} option (@pxref{Invoking libtool}). It is a good
+idea to do so in @file{Makefile} rules, because that will allow users to
+substitute the compiler without relying on @command{libtool} inference
+heuristics. Note that there is no tag for @code{C} because that is
+the default configuration.
+
+Finally, the set of tags available in a particular project can be
+retrieved by tracing for the @code{LT_SUPPORTED_TAG} macro (@pxref{Trace
+interface}).
@node Versioning
@chapter Library interface versions
@menu
* Libltdl interface:: How to use libltdl in your programs.
* Modules for libltdl:: Creating modules that can be @code{dlopen}ed.
-* Thread Saftey in libltdl:: Registering callbacks for multi-thread safety.
+* Thread Safety in libltdl:: Registering callbacks for multi-thread safety.
* User defined module data:: Associating data with loaded modules.
* Module loaders for libltdl:: Creating user defined module loaders.
* Distributing libltdl:: How to distribute libltdl with your package.
@noindent
Note that libltdl is not well tested in a multithreaded environment,
-though the intention is that it should work (@pxref{Thread Saftey
+though the intention is that it should work (@pxref{Thread Safety
in libltdl, , Using libtldl in a multi threaded environment}). It was
reported that @sc{gnu}/Linux's glibc 2.0's @code{dlopen} with
@samp{RTLD_LAZY} (which libltdl uses by default) is not thread-safe,
@end example
-@node Thread Saftey in libltdl
+@node Thread Safety in libltdl
@section Using libtldl in a multi threaded environment
Libltdl provides a wrapper around whatever dynamic run-time object
@end example
+@node Trace interface
+@chapter Libtool's trace interface
+@cindex trace interface
+@cindex autoconf traces
+
+This section describes macros whose sole purpose is to be traced using
+Autoconf's @code{--trace} option (@pxref{autoconf Invocation, , The
+Autoconf Manual, autoconf, The Autoconf Manual}) to query the Libtool
+configuration of a project. These macros are called by Libtool
+internals and should never be called by user code; they should only be
+traced.
+
+@defmac LT_SUPPORTED_TAG (@var{tag})
+This macro is called once for each language enabled in the package. Its
+only argument, @var{tag}, is the tag-name corresponding to the language
+(@pxref{Tags}).
+
+You can therefore retrieve the list of all tags enabled in a project
+using the following command:
+@example
+autoconf --trace 'LT_SUPPORTED_TAG:$1'
+@end example
+@end defmac
+
+
@node Troubleshooting
@chapter Troubleshooting
@cindex troubleshooting
* References:: Finding more information.
* Compilers:: Creating object files from source files.
* Reloadable objects:: Binding object files together.
-* Multiple dependencies:: Removing duplicate dependent libraries.
+* Multiple dependencies:: Removing duplicate dependent libraries.
* Archivers:: Programs that create static archives.
@end menu