--- automake.texi.330 Tue Apr 8 13:54:49 2003 +++ automake.texi Tue Apr 8 14:47:30 2003 @@ -703,8 +703,12 @@ @cindex GNU Hello, configure.in @cindex Hello, configure.in -Here is the @file{configure.in} from GNU Hello: address@hidden FIXME: This definitively requires an update. +Here is the @file{configure.in} from GNU Hello. address@hidden 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}. + address@hidden 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. @@ -1572,8 +1576,14 @@ @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). @@ -1583,7 +1593,7 @@ 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) @@ -1593,19 +1603,14 @@ 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 address@hidden, as in the example above. The first argument of address@hidden is the name of your package (e.g. @samp{GNU Automake}), -not the tarball name (e.g. @samp{automake}) you used to pass to address@hidden 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}. address@hidden, as in the example above. The first argument to address@hidden 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 address@hidden 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}