@pindex gnulib-tool
@cindex invoking @command{gnulib-tool}
-@command{gnulib-tool} is the way to import Gnulib modules. It is also
-possible to borrow Gnulib modules in a package without using
-@command{gnulib-tool}, relying only on the metainformation stored in
-the @file{modules/*} files, but with a growing number of modules this
-becomes tedious. @command{gnulib-tool} simplifies the management of
-source files, @file{Makefile.am}s and @file{configure.ac} in packages
-incorporating Gnulib modules.
-
-Run @samp{gnulib-tool --help}. To get familiar with @command{gnulib-tool},
-you can also try some commands with the option @samp{--dry-run}; then
-@code{gnulib-tool} will only report which actions it would perform in a
-real run.
+The @command{gnulib-tool} command is the recommended way to import
+Gnulib modules. It is possible to borrow Gnulib modules in a package
+without using @command{gnulib-tool}, relying only on the
+metainformation stored in the @file{modules/*} files, but with a
+growing number of modules this becomes tedious. @command{gnulib-tool}
+simplifies the management of source files, @file{Makefile.am}s and
+@file{configure.ac} in packages incorporating Gnulib modules.
+
+Run @samp{gnulib-tool --help} for information. To get familiar with
+@command{gnulib-tool} without affecting your sources, you can also try
+some commands with the option @samp{--dry-run}; then
+@code{gnulib-tool} will only report which actions it would perform in
+a real run without changing anything.
@menu
* Initial import:: First import of Gnulib modules.
A few manual steps are required to finish the initial import.
@code{gnulib-tool} printed a summary of these steps.
-First, you need to make sure Autoconf can find the macro definitions
-in @file{gnulib-comp.m4}. Use the @code{ACLOCAL_AMFLAGS} specifier in your
-top-level @file{Makefile.am} file, as in:
+First, you must ensure Autoconf can find the macro definitions in
+@file{gnulib-comp.m4}. Use the @code{ACLOCAL_AMFLAGS} specifier in
+your top-level @file{Makefile.am} file, as in:
@example
ACLOCAL_AMFLAGS = -I m4
The core part of the gnulib checks are done by the macro
@code{gl_INIT}. Place it further down in the file, typically where
-you normally check for header files or functions. For example:
+you normally check for header files or functions. It must come after
+other checks which may affect the compiler invocation, such as
+@code{AC_MINIX}. For example:
@example
...
...
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib
...
-LIBADD = lib/libgnu.a
+LDADD = lib/libgnu.a
...
@end example
@samp{#include <time.h>} as it is already done in @file{time_r.h}
before the redefinition of some symbols.
+A final word of warning: Gnulib currently assumes it will be
+responsible for @emph{all} functions that end up in the Autoconf
+@code{@@LIBOBJS@@} variables (and/or @code{@@LTLIBOBJS@@} if using
+Libtool), e.g., those specified in @code{AC_REPLACE_FUNCS} in your
+@file{configure.ac}. Therefore, if you have any functions which are
+not covered by Gnulib which need that treatment, you have to
+essentially reimplement AC_REPLACE_FUNCS using different names; for an
+example, see the Findutils sources. Perhaps this will be improved in
+the future.
+
+
@node Modified imports
@section Modified imports
\input texinfo @c -*-texinfo-*-
-@comment $Id: gnulib.texi,v 1.21 2006-04-30 13:38:54 karl Exp $
+@comment $Id: gnulib.texi,v 1.22 2006-06-19 20:40:26 karl Exp $
@comment %**start of header
@setfilename gnulib.info
@settitle GNU Gnulib
@syncodeindex pg cp
@comment %**end of header
-@set UPDATED $Date: 2006-04-30 13:38:54 $
+@set UPDATED $Date: 2006-06-19 20:40:26 $
@copying
This manual is for GNU Gnulib (updated @value{UPDATED}),
AC_DEFINE something like:
@example
-AC_DEFINE(check_version, stringprep_check_version, [Rename check_version.])
+AC_DEFINE(check_version, stringprep_check_version,
+ [Rename check_version.])
@end example
The @code{stringprep_check_version} function will thus be implemented