@cindex GNU Hello, configure.in
@cindex Hello, configure.in
-Here is the @file{configure.in} from GNU Hello:
-@c FIXME: This definitively requires an update.
+Here is the @file{configure.in} from GNU Hello.
+@strong{Please note:} The calls to @code{AC_INIT} and @code{AM_INIT_AUTOMAKE}
+in this example use a deprecated syntax. For the current approach,
+see the description of @code{AM_INIT_AUTOMAKE} in @ref{Public macros}.
+
+@c FIXME: This definitely requires an update, e.g. to GNU Hello 2.1.1.
@example
dnl Process this file with autoconf to produce a configure script.
@itemx AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
Runs many macros required for proper operation of the generated Makefiles.
-This macro has two forms, the second of which has two required
-arguments: the package and the version number. This latter form is
+This macro has two forms, the first of which is preferred.
+In this form, @code{AM_INIT_AUTOMAKE} is called with a
+single argument --- a space-separated list of Automake options which should
+be applied to every @file{Makefile.am} in the tree. The effect is as if
+each option were listed in @code{AUTOMAKE_OPTIONS}.
+
+The second, deprecated, form of @code{AM_INIT_AUTOMAKE} has two required
+arguments: the package and the version number. This form is
obsolete because the @var{package} and @var{version} can be obtained
from Autoconf's @code{AC_INIT} macro (which itself has an old and a new
form).
AC_INIT(src/foo.c)
AM_INIT_AUTOMAKE(mumble, 1.5)
@end example
-you can modernize it as follow:
+you can modernize it as follows:
@example
AC_INIT(mumble, 1.5)
AC_CONFIG_SRCDIR(src/foo.c)
Note that if you're upgrading your @file{configure.in} from an earlier
version of Automake, it is not always correct to simply move the package
and version arguments from @code{AM_INIT_AUTOMAKE} directly to
-@code{AC_INIT}, as in the example above. The first argument of
-@code{AC_INIT} is the name of your package (e.g. @samp{GNU Automake}),
-not the tarball name (e.g. @samp{automake}) you used to pass to
-@code{AM_INIT_AUTOMAKE}. Autoconf's rule to derive a tarball name from
-the package name should work for most but not all packages. Especially,
-if your tarball name is not all lower case, you will have to use the
-four-argument form of @code{AC_INIT} (supported in Autoconf versions
-greater than 2.52g).
-
-When @code{AM_INIT_AUTOMAKE} is called with a single argument, it is
-interpreted as a space-separated list of Automake options which should
-be applied to every @file{Makefile.am} in the tree. The effect is as if
-each option were listed in @code{AUTOMAKE_OPTIONS}.
+@code{AC_INIT}, as in the example above. The first argument to
+@code{AC_INIT} should be the name of your package (e.g. @samp{GNU Automake}),
+not the tarball name (e.g. @samp{automake}) that you used to pass to
+@code{AM_INIT_AUTOMAKE}. Autoconf tries to derive a tarball name from
+the package name, which should work for most but not all package names.
+(If it doesn't work for yours, you can use the
+four-argument form of @code{AC_INIT} --- supported in Autoconf versions
+greater than 2.52g --- to provide the tarball name explicitly).
By default this macro @code{AC_DEFINE}'s @samp{PACKAGE} and
@samp{VERSION}. This can be avoided by passing the @samp{no-define}