Previous: Importing updated files, Up: Invoking gnulib-tool
Invoking `gnulib-tool --import' with the proper parameters (e.g., `--m4-base gl/m4') and list of modules (e.g., `strdup snprintf getline minmax') can be tedious. To simplify this procedure, you may put the command line parameters in your configure.ac. For example:
...
AC_PROG_CC
gl_EARLY
...
# For gnulib.
gl_SOURCE_BASE(gl)
gl_M4_BASE(gl/m4)
gl_LIB(libgl)
gl_MODULES(getopt progname strdup dummy exit error getpass-gnu getaddrinfo)
gl_INIT
...
This illustrate all macros defined in gnulib.m4. With the above, importing new files are as simple as running `gnulib-tool --import' with no additional parameters.
The macros gl_EARLY, gl_INIT, gl_SOURCE_BASE, and
gl_M4_BASE have been discussed earlier. The gl_LIB
macro can be used if you wish to change the library name (by default
libgnu.a or libgnu.la if you use libtool). The
gl_MODULES macro is used to specify which modules to import.