1479 |
anything else. The only other required macro is @code{AC_OUTPUT} |
anything else. The only other required macro is @code{AC_OUTPUT} |
1480 |
(@pxref{Output}). |
(@pxref{Output}). |
1481 |
|
|
1482 |
@defmac AC_INIT (@var{package}) |
@defmac AC_INIT (@var{package}, @var{version}, @ovar{bug-report}, @ovar{tarname}) |
1483 |
@acindex INIT |
@acindex INIT |
1484 |
Process any command-line arguments and perform various initializations |
Process any command-line arguments and perform various initializations |
1485 |
and verifications. Set the name of the @var{package} and its |
and verifications. |
1486 |
@var{version}. The optional argument @var{bug-report-address} should be |
|
1487 |
the email to which users should send bug reports. |
Set the name of the @var{package} and its @var{version}. These are |
1488 |
|
typically used in @option{--version} support, including that of |
1489 |
These three arguments should be @emph{static}, i.e., there should not be |
@command{configure}. The optional argument @var{bug-report} should be |
1490 |
any shell computation, but they can be computed by M4. The following M4 |
the email to which users should send bug reports. The package |
1491 |
macros (e.g., @code{AC_PACKAGE_NAME}), output variables (e.g., |
@var{tarname} differs from @var{package}: the latter designates the full |
1492 |
|
package name (e.g., @samp{GNU Autoconf}), while the latter is meant for |
1493 |
|
distribution tar ball names (e.g., @samp{autoconf}). It defaults to |
1494 |
|
@var{package} once @samp{GNU } strip, lower cased, and all non |
1495 |
|
alphanumeric character mapped onto @samp{-}. |
1496 |
|
|
1497 |
|
It is preferable that these arguments be static, i.e., there should not |
1498 |
|
be any shell computation, but they can be computed by M4. The following |
1499 |
|
M4 macros (e.g., @code{AC_PACKAGE_NAME}), output variables (e.g., |
1500 |
@code{PACKAGE_NAME}), and preprocessor symbols (e.g., |
@code{PACKAGE_NAME}), and preprocessor symbols (e.g., |
1501 |
@code{PACKAGE_NAME}) are then defined: |
@code{PACKAGE_NAME}) are then defined: |
1502 |
|
|
1511 |
@acindex PACKAGE_TARNAME |
@acindex PACKAGE_TARNAME |
1512 |
@ovindex PACKAGE_TARNAME |
@ovindex PACKAGE_TARNAME |
1513 |
@cvindex PACKAGE_TARNAME |
@cvindex PACKAGE_TARNAME |
1514 |
@var{package} once @samp{GNU } strip, lower cased, and all non |
Exactly @var{tarname}. |
|
alphanumeric character mapped onto @samp{-}. |
|
1515 |
|
|
1516 |
@item @code{AC_PACKAGE_VERSION}, @code{PACKAGE_VERSION} |
@item @code{AC_PACKAGE_VERSION}, @code{PACKAGE_VERSION} |
1517 |
@acindex PACKAGE_VERSION |
@acindex PACKAGE_VERSION |
1529 |
@acindex PACKAGE_BUGREPORT |
@acindex PACKAGE_BUGREPORT |
1530 |
@ovindex PACKAGE_BUGREPORT |
@ovindex PACKAGE_BUGREPORT |
1531 |
@cvindex PACKAGE_BUGREPORT |
@cvindex PACKAGE_BUGREPORT |
1532 |
Exactly @var{bug-report-address}. |
Exactly @var{bug-report}. |
1533 |
@end table |
@end table |
|
|
|
|
All these values may be changed. For instance if the default value for |
|
|
@code{AC_PACKAGE_NAME} does not suit your application, you can either |
|
|
use: |
|
|
|
|
|
@example |
|
|
m4_define([AC_PACKAGE_TARNAME], [GNU-Foo-Bar-1.0]) |
|
|
AC_INIT([GNU Foo Bar], [1.0]) |
|
|
@end example |
|
|
|
|
|
@noindent |
|
|
or |
|
|
|
|
|
@example |
|
|
AC_INIT([GNU Foo Bar], [1.0]) |
|
|
m4_define([AC_PACKAGE_TARNAME], [GNU-Foo-Bar-1.0]) |
|
|
AC_SUBST([PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME']) |
|
|
@end example |
|
1534 |
@end defmac |
@end defmac |
1535 |
|
|
1536 |
|
|