[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Accessing AC_DEFINE'd var
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Accessing AC_DEFINE'd var |
Date: |
Sat, 02 Aug 2003 09:55:15 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
>>> "Frank" == Frank A Uepping <address@hidden> writes:
[...]
Frank> (I am wondering that AM_INIT_AUTOMAKE doesn't use PACKAGE_* by default.)
`AM_INIT_AUTOMAKE([OPTIONS])'
`AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])'
Runs many macros required for proper operation of the generated
Makefiles.
This macro has two forms, the first of which is preferred. In
this form, `AM_INIT_AUTOMAKE' is called with a single argument --
a space-separated list of Automake options which should be applied
to every `Makefile.am' in the tree. The effect is as if each
option were listed in `AUTOMAKE_OPTIONS'.
The second, deprecated, form of `AM_INIT_AUTOMAKE' has two required
arguments: the package and the version number. This form is
obsolete because the PACKAGE and VERSION can be obtained from
Autoconf's `AC_INIT' macro (which itself has an old and a new
form).
If your `configure.in' has:
AC_INIT(src/foo.c)
AM_INIT_AUTOMAKE(mumble, 1.5)
you can modernize it as follows:
AC_INIT(mumble, 1.5)
AC_CONFIG_SRCDIR(src/foo.c)
AM_INIT_AUTOMAKE
Note that if you're upgrading your `configure.in' from an earlier
version of Automake, it is not always correct to simply move the
package and version arguments from `AM_INIT_AUTOMAKE' directly to
`AC_INIT', as in the example above. The first argument to
`AC_INIT' should be the name of your package (e.g. `GNU Automake'),
not the tarball name (e.g. `automake') that you used to pass to
`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 `AC_INIT' -- supported in Autoconf versions
greater than 2.52g -- to provide the tarball name explicitly).
By default this macro `AC_DEFINE''s `PACKAGE' and `VERSION'. This
can be avoided by passing the `no-define' option, as in:
AM_INIT_AUTOMAKE([gnits 1.5 no-define dist-bzip2])
or by passing a third non-empty argument to the obsolete form.
--
Alexandre Duret-Lutz