mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-18 10:45:15 +08:00
* acgeneral.m4 (_AC_INIT_BINSH): Remove, useless now that...
(AC_REVISION): Require AC_INIT, not _AC_INIT_BINSH. (AC_INIT): Do what _AC_INIT_BINSH used to. Don't require _AC_INIT_VERSION, just call it. Rename as _AC_INIT. (AC_INIT): New macro, single expansion wrapper around _AC_INIT. (_AC_COPYRIGHT_SEPARATOR): New. (AC_COPYRIGHT): Use it. Require AC_INIT, not _AC_INIT_VERSION. * doc/autoconf.texi (Versions): Promote as first section of `Setup'. Rename as `Notices'. Document AC_COPYRIGHT. Don't give false reasons for placing AC_REVISION before AC_INIT, the place no longer matters.
This commit is contained in:
parent
af8421f6c5
commit
870e58847d
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
||||
2000-03-14 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* acgeneral.m4 (_AC_INIT_BINSH): Remove, useless now that...
|
||||
(AC_REVISION): Require AC_INIT, not _AC_INIT_BINSH.
|
||||
(AC_INIT): Do what _AC_INIT_BINSH used to.
|
||||
Don't require _AC_INIT_VERSION, just call it.
|
||||
Rename as _AC_INIT.
|
||||
(AC_INIT): New macro, single expansion wrapper around _AC_INIT.
|
||||
(_AC_COPYRIGHT_SEPARATOR): New.
|
||||
(AC_COPYRIGHT): Use it.
|
||||
Require AC_INIT, not _AC_INIT_VERSION.
|
||||
* doc/autoconf.texi (Versions): Promote as first section of
|
||||
`Setup'.
|
||||
Rename as `Notices'.
|
||||
Document AC_COPYRIGHT.
|
||||
Don't give false reasons for placing AC_REVISION before AC_INIT,
|
||||
the place no longer matters.
|
||||
|
||||
2000-03-14 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* autoconf.sh (trace_m4::smash): Double quote, we don't want the
|
||||
|
67
acgeneral.m4
67
acgeneral.m4
@ -613,20 +613,15 @@ popdef([AC_Prefix])dnl
|
||||
## ---------------- ##
|
||||
|
||||
|
||||
# _AC_INIT_BINSH
|
||||
# --------------
|
||||
# Try to have only one #! line, so the script doesn't look funny
|
||||
# for users of AC_REVISION.
|
||||
AC_DEFUN(_AC_INIT_BINSH,
|
||||
[AC_DIVERT_PUSH([BINSH])dnl
|
||||
#! /bin/sh
|
||||
AC_DIVERT_POP()dnl to KILL
|
||||
])
|
||||
|
||||
# _AC_COPYRIGHT_SEPARATOR
|
||||
# -----------------------
|
||||
# Empty at the first call to AC_COPYRIGHT, then set to two new lines.
|
||||
define(_AC_COPYRIGHT_SEPARATOR)
|
||||
|
||||
|
||||
# AC_COPYRIGHT(TEXT)
|
||||
# ------------------
|
||||
|
||||
# Append Copyright information in the top of `configure'. TEXT is
|
||||
# evaluated once, hence TEXT can use macros. Note that we do not
|
||||
# prepend `# ' but `@%:@ ', since m4 does not evaluate the comments.
|
||||
@ -634,18 +629,23 @@ AC_DIVERT_POP()dnl to KILL
|
||||
# would have not been evaluated. Another solution, a bit fragile,
|
||||
# would have be to use m4_quote to force an evaluation:
|
||||
#
|
||||
# patsubst(m4_quote($1), [^], [@%:@ ])
|
||||
# patsubst(m4_quote($1), [^], [# ])
|
||||
#
|
||||
# _AC_INIT_VERSION must be run before, exactly like _AC_INIT_BINSH
|
||||
# must be run before AC_REVISION.
|
||||
# AC_INIT must be run before, exactly like for AC_REVISION.
|
||||
AC_DEFUN(AC_COPYRIGHT,
|
||||
[AC_REQUIRE([_AC_INIT_VERSION])dnl
|
||||
[AC_REQUIRE([AC_INIT])dnl
|
||||
AC_DIVERT_PUSH([NOTICE])dnl
|
||||
patsubst([$1], [^], [@%:@ ])
|
||||
patsubst([]_AC_COPYRIGHT_SEPARATOR()dnl
|
||||
[$1], [^], [@%:@ ])
|
||||
AC_DIVERT_POP()dnl
|
||||
AC_DIVERT_PUSH([VERSION_BEGIN])dnl
|
||||
_AC_COPYRIGHT_SEPARATOR()dnl
|
||||
$1
|
||||
AC_DIVERT_POP()dnl
|
||||
define([_AC_COPYRIGHT_SEPARATOR],
|
||||
[
|
||||
|
||||
])dnl
|
||||
])# _AC_INIT_COPYRIGHT
|
||||
|
||||
|
||||
@ -654,6 +654,7 @@ AC_DIVERT_POP()dnl
|
||||
# Values which defaults can be set from `configure.in'.
|
||||
AC_DEFUN(_AC_INIT_DEFAULTS,
|
||||
[AC_DIVERT_PUSH([DEFAULTS])dnl
|
||||
|
||||
# Defaults:
|
||||
ac_default_prefix=/usr/local
|
||||
@%:@ Any additions from configure.in:
|
||||
@ -1278,13 +1279,24 @@ AC_DIVERT_POP()dnl
|
||||
])# _AC_INIT_PREPARE
|
||||
|
||||
|
||||
# AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
|
||||
# ------------------------------------
|
||||
# Output the preamble of the `configure' script.
|
||||
AC_DEFUN(AC_INIT,
|
||||
# _AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
|
||||
# -------------------------------------
|
||||
# Include the user macro files, prepare the diversions, and output the
|
||||
# preamble of the `configure' script.
|
||||
define([_AC_INIT],
|
||||
[m4_sinclude(acsite.m4)dnl
|
||||
m4_sinclude(./aclocal.m4)dnl
|
||||
AC_REQUIRE([_AC_INIT_BINSH])dnl
|
||||
AC_DIVERT_PUSH([BINSH])dnl
|
||||
#! /bin/sh
|
||||
AC_DIVERT_POP()dnl to KILL
|
||||
_AC_INIT_DEFAULTS()dnl
|
||||
AC_DIVERT_POP()dnl to NORMAL
|
||||
_AC_INIT_PARSE_ARGS
|
||||
_AC_INIT_HELP
|
||||
_AC_INIT_VERSION
|
||||
_AC_INIT_PREPARE([$1])dnl
|
||||
dnl AC_COPYRIGHT must be called after _AC_INIT_VERSION, since it dumps
|
||||
dnl into a diversion prepared by _AC_INIT_VERSION.
|
||||
AC_DIVERT_PUSH([NOTICE])dnl
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
AC_DIVERT_POP()dnl
|
||||
@ -1295,15 +1307,14 @@ Free Software Foundation, Inc.
|
||||
|
||||
This configure script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it.])dnl
|
||||
_AC_INIT_DEFAULTS()dnl
|
||||
AC_DIVERT_POP()dnl to NORMAL
|
||||
_AC_INIT_PARSE_ARGS
|
||||
_AC_INIT_HELP
|
||||
AC_REQUIRE([_AC_INIT_VERSION])dnl
|
||||
_AC_INIT_PREPARE([$1])dnl
|
||||
])
|
||||
|
||||
|
||||
# AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
|
||||
# ------------------------------------
|
||||
# Wrapper around _AC_INIT which guarantees _AC_INIT is expanded only
|
||||
# once.
|
||||
AC_DEFUN([AC_INIT], [AC_EXPAND_ONCE([_AC_INIT])])
|
||||
|
||||
|
||||
## ----------------------------- ##
|
||||
@ -1445,9 +1456,9 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
|
||||
# AC_REVISION(REVISION-INFO)
|
||||
# --------------------------
|
||||
AC_DEFUN(AC_REVISION,
|
||||
[AC_REQUIRE([_AC_INIT_BINSH])dnl
|
||||
[AC_REQUIRE([AC_INIT])dnl
|
||||
AC_DIVERT_PUSH([BINSH])dnl
|
||||
[# From configure.in] translit([$1], $")
|
||||
@%:@ From configure.in translit([$1], $")
|
||||
AC_DIVERT_POP()dnl to KILL
|
||||
])
|
||||
|
||||
|
@ -154,6 +154,7 @@ Making @code{configure} Scripts
|
||||
|
||||
Initialization and Output Files
|
||||
|
||||
* Notices:: Copyright, version numbers in @code{configure}
|
||||
* Input:: Where Autoconf should find files
|
||||
* Output:: Outputting results from the configuration
|
||||
* Configuration Actions:: Preparing the output based on results
|
||||
@ -164,7 +165,6 @@ Initialization and Output Files
|
||||
* Configuration Links:: Links depending from the configuration
|
||||
* Subdirectories:: Configuring independent packages together
|
||||
* Default Prefix:: Changing the default installation prefix
|
||||
* Versions:: Version numbers in @code{configure}
|
||||
|
||||
Substitutions in Makefiles
|
||||
|
||||
@ -526,6 +526,8 @@ functions could be affected by types and libraries.
|
||||
|
||||
@display
|
||||
@group
|
||||
Autoconf requirements
|
||||
information on the package
|
||||
@code{AC_INIT(@var{file})}
|
||||
checks for programs
|
||||
checks for libraries
|
||||
@ -903,6 +905,7 @@ about the output files to produce. The following sections describe
|
||||
initialization and creating output files.
|
||||
|
||||
@menu
|
||||
* Notices:: Copyright, version numbers in @code{configure}
|
||||
* Input:: Where Autoconf should find files
|
||||
* Output:: Outputting results from the configuration
|
||||
* Configuration Actions:: Preparing the output based on results
|
||||
@ -913,10 +916,68 @@ initialization and creating output files.
|
||||
* Configuration Links:: Links depending from the configuration
|
||||
* Subdirectories:: Configuring independent packages together
|
||||
* Default Prefix:: Changing the default installation prefix
|
||||
* Versions:: Version numbers in @code{configure}
|
||||
@end menu
|
||||
|
||||
@node Input, Output, Setup, Setup
|
||||
@node Notices, Input, Setup, Setup
|
||||
@section Notices in @code{configure}
|
||||
|
||||
The following macros manage version numbers for @code{configure}
|
||||
scripts. Using them is optional.
|
||||
|
||||
@c FIXME: AC_PREREQ should not be here, but where should it go?
|
||||
@defmac AC_PREREQ (@var{version})
|
||||
@maindex PREREQ
|
||||
@cindex Version
|
||||
Ensure that a recent enough version of Autoconf is being used. If the
|
||||
version of Autoconf being used to create @code{configure} is earlier
|
||||
than @var{version}, print an error message on the standard error output
|
||||
and do not create @code{configure}. For example:
|
||||
|
||||
@example
|
||||
AC_PREREQ(@value{VERSION})
|
||||
@end example
|
||||
@end defmac
|
||||
|
||||
@defmac AC_COPYRIGHT(@var{copyright-notice})
|
||||
@maindex COPYRIGHT
|
||||
@cindex Copyright Notice
|
||||
State that in addition to the Free Software Foundation's copyright over
|
||||
the Autoconf macros, parts of your @code{configure} are covered by the
|
||||
@var{copyright-notice}.
|
||||
|
||||
The @var{copyright-notice} will show up in both the head of
|
||||
@code{configure}, and in @samp{configure --version}.
|
||||
@end defmac
|
||||
|
||||
|
||||
@defmac AC_REVISION (@var{revision-info})
|
||||
@maindex REVISION
|
||||
@cindex Revision
|
||||
Copy revision stamp @var{revision-info} into the @code{configure}
|
||||
script, with any dollar signs or double-quotes removed. This macro lets
|
||||
you put a revision stamp from @file{configure.in} into @code{configure}
|
||||
without RCS or CVS changing it when you check in @code{configure}. That
|
||||
way, you can determine easily which revision of @file{configure.in} a
|
||||
particular @code{configure} corresponds to.
|
||||
|
||||
For example, this line in @file{configure.in}:
|
||||
|
||||
@c The asis prevents RCS from changing the example in the manual.
|
||||
@example
|
||||
AC_REVISION($@asis{Revision: 1.30 }$)dnl
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
produces this in @code{configure}:
|
||||
|
||||
@example
|
||||
#! /bin/sh
|
||||
# From configure.in Revision: 1.30
|
||||
@end example
|
||||
@end defmac
|
||||
|
||||
|
||||
@node Input, Output, Notices, Setup
|
||||
@section Finding @code{configure} Input
|
||||
|
||||
Every @code{configure} script must call @code{AC_INIT} before doing
|
||||
@ -1822,7 +1883,7 @@ which subdirectories to recurse into. This macro may be called multiple
|
||||
times.
|
||||
@end defmac
|
||||
|
||||
@node Default Prefix, Versions, Subdirectories, Setup
|
||||
@node Default Prefix, , Subdirectories, Setup
|
||||
@section Default Prefix
|
||||
|
||||
By default, @code{configure} sets the prefix for files it installs to
|
||||
@ -1857,62 +1918,9 @@ is found, set the prefix to the parent of the directory containing
|
||||
set the prefix to @file{/usr/local/gnu}.
|
||||
@end defmac
|
||||
|
||||
@node Versions, , Default Prefix, Setup
|
||||
@section Version Numbers in @code{configure}
|
||||
|
||||
The following macros manage version numbers for @code{configure}
|
||||
scripts. Using them is optional.
|
||||
|
||||
@defmac AC_PREREQ (@var{version})
|
||||
@maindex PREREQ
|
||||
@cindex Version
|
||||
Ensure that a recent enough version of Autoconf is being used. If the
|
||||
version of Autoconf being used to create @code{configure} is earlier
|
||||
than @var{version}, print an error message on the standard error output
|
||||
and do not create @code{configure}. For example:
|
||||
|
||||
@example
|
||||
AC_PREREQ(@value{VERSION})
|
||||
@end example
|
||||
|
||||
This macro is useful if your @file{configure.in} relies on non-obvious
|
||||
behavior that changed between Autoconf releases. If it merely needs
|
||||
recently added macros, then @code{AC_PREREQ} is less useful, because the
|
||||
@code{autoconf} program already tells the user which macros are not
|
||||
found. The same thing happens if @file{configure.in} is processed by a
|
||||
version of Autoconf older than when @code{AC_PREREQ} was added.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_REVISION (@var{revision-info})
|
||||
@maindex REVISION
|
||||
Copy revision stamp @var{revision-info} into the @code{configure}
|
||||
script, with any dollar signs or double-quotes removed. This macro lets
|
||||
you put a revision stamp from @file{configure.in} into @code{configure}
|
||||
without RCS or CVS changing it when you check in @code{configure}. That
|
||||
way, you can determine easily which revision of @file{configure.in} a
|
||||
particular @code{configure} corresponds to.
|
||||
|
||||
It is a good idea to call this macro before @code{AC_INIT} so that the
|
||||
revision number is near the top of both @file{configure.in} and
|
||||
@code{configure}. To support doing that, the @code{AC_REVISION} output
|
||||
begins with @samp{#! /bin/sh}, like the normal start of a
|
||||
@code{configure} script does.
|
||||
|
||||
For example, this line in @file{configure.in}:
|
||||
|
||||
@c The asis prevents RCS from changing the example in the manual.
|
||||
@example
|
||||
AC_REVISION($@asis{Revision: 1.30 }$)dnl
|
||||
@end example
|
||||
|
||||
@noindent
|
||||
produces this in @code{configure}:
|
||||
|
||||
@example
|
||||
#! /bin/sh
|
||||
# From configure.in Revision: 1.30
|
||||
@end example
|
||||
@end defmac
|
||||
@c ======================================================== Existing tests
|
||||
|
||||
@node Existing Tests, Writing Tests, Setup, Top
|
||||
@chapter Existing Tests
|
||||
|
@ -613,20 +613,15 @@ popdef([AC_Prefix])dnl
|
||||
## ---------------- ##
|
||||
|
||||
|
||||
# _AC_INIT_BINSH
|
||||
# --------------
|
||||
# Try to have only one #! line, so the script doesn't look funny
|
||||
# for users of AC_REVISION.
|
||||
AC_DEFUN(_AC_INIT_BINSH,
|
||||
[AC_DIVERT_PUSH([BINSH])dnl
|
||||
#! /bin/sh
|
||||
AC_DIVERT_POP()dnl to KILL
|
||||
])
|
||||
|
||||
# _AC_COPYRIGHT_SEPARATOR
|
||||
# -----------------------
|
||||
# Empty at the first call to AC_COPYRIGHT, then set to two new lines.
|
||||
define(_AC_COPYRIGHT_SEPARATOR)
|
||||
|
||||
|
||||
# AC_COPYRIGHT(TEXT)
|
||||
# ------------------
|
||||
|
||||
# Append Copyright information in the top of `configure'. TEXT is
|
||||
# evaluated once, hence TEXT can use macros. Note that we do not
|
||||
# prepend `# ' but `@%:@ ', since m4 does not evaluate the comments.
|
||||
@ -634,18 +629,23 @@ AC_DIVERT_POP()dnl to KILL
|
||||
# would have not been evaluated. Another solution, a bit fragile,
|
||||
# would have be to use m4_quote to force an evaluation:
|
||||
#
|
||||
# patsubst(m4_quote($1), [^], [@%:@ ])
|
||||
# patsubst(m4_quote($1), [^], [# ])
|
||||
#
|
||||
# _AC_INIT_VERSION must be run before, exactly like _AC_INIT_BINSH
|
||||
# must be run before AC_REVISION.
|
||||
# AC_INIT must be run before, exactly like for AC_REVISION.
|
||||
AC_DEFUN(AC_COPYRIGHT,
|
||||
[AC_REQUIRE([_AC_INIT_VERSION])dnl
|
||||
[AC_REQUIRE([AC_INIT])dnl
|
||||
AC_DIVERT_PUSH([NOTICE])dnl
|
||||
patsubst([$1], [^], [@%:@ ])
|
||||
patsubst([]_AC_COPYRIGHT_SEPARATOR()dnl
|
||||
[$1], [^], [@%:@ ])
|
||||
AC_DIVERT_POP()dnl
|
||||
AC_DIVERT_PUSH([VERSION_BEGIN])dnl
|
||||
_AC_COPYRIGHT_SEPARATOR()dnl
|
||||
$1
|
||||
AC_DIVERT_POP()dnl
|
||||
define([_AC_COPYRIGHT_SEPARATOR],
|
||||
[
|
||||
|
||||
])dnl
|
||||
])# _AC_INIT_COPYRIGHT
|
||||
|
||||
|
||||
@ -654,6 +654,7 @@ AC_DIVERT_POP()dnl
|
||||
# Values which defaults can be set from `configure.in'.
|
||||
AC_DEFUN(_AC_INIT_DEFAULTS,
|
||||
[AC_DIVERT_PUSH([DEFAULTS])dnl
|
||||
|
||||
# Defaults:
|
||||
ac_default_prefix=/usr/local
|
||||
@%:@ Any additions from configure.in:
|
||||
@ -1278,13 +1279,24 @@ AC_DIVERT_POP()dnl
|
||||
])# _AC_INIT_PREPARE
|
||||
|
||||
|
||||
# AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
|
||||
# ------------------------------------
|
||||
# Output the preamble of the `configure' script.
|
||||
AC_DEFUN(AC_INIT,
|
||||
# _AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
|
||||
# -------------------------------------
|
||||
# Include the user macro files, prepare the diversions, and output the
|
||||
# preamble of the `configure' script.
|
||||
define([_AC_INIT],
|
||||
[m4_sinclude(acsite.m4)dnl
|
||||
m4_sinclude(./aclocal.m4)dnl
|
||||
AC_REQUIRE([_AC_INIT_BINSH])dnl
|
||||
AC_DIVERT_PUSH([BINSH])dnl
|
||||
#! /bin/sh
|
||||
AC_DIVERT_POP()dnl to KILL
|
||||
_AC_INIT_DEFAULTS()dnl
|
||||
AC_DIVERT_POP()dnl to NORMAL
|
||||
_AC_INIT_PARSE_ARGS
|
||||
_AC_INIT_HELP
|
||||
_AC_INIT_VERSION
|
||||
_AC_INIT_PREPARE([$1])dnl
|
||||
dnl AC_COPYRIGHT must be called after _AC_INIT_VERSION, since it dumps
|
||||
dnl into a diversion prepared by _AC_INIT_VERSION.
|
||||
AC_DIVERT_PUSH([NOTICE])dnl
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
AC_DIVERT_POP()dnl
|
||||
@ -1295,15 +1307,14 @@ Free Software Foundation, Inc.
|
||||
|
||||
This configure script is free software; the Free Software Foundation
|
||||
gives unlimited permission to copy, distribute and modify it.])dnl
|
||||
_AC_INIT_DEFAULTS()dnl
|
||||
AC_DIVERT_POP()dnl to NORMAL
|
||||
_AC_INIT_PARSE_ARGS
|
||||
_AC_INIT_HELP
|
||||
AC_REQUIRE([_AC_INIT_VERSION])dnl
|
||||
_AC_INIT_PREPARE([$1])dnl
|
||||
])
|
||||
|
||||
|
||||
# AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
|
||||
# ------------------------------------
|
||||
# Wrapper around _AC_INIT which guarantees _AC_INIT is expanded only
|
||||
# once.
|
||||
AC_DEFUN([AC_INIT], [AC_EXPAND_ONCE([_AC_INIT])])
|
||||
|
||||
|
||||
## ----------------------------- ##
|
||||
@ -1445,9 +1456,9 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
|
||||
# AC_REVISION(REVISION-INFO)
|
||||
# --------------------------
|
||||
AC_DEFUN(AC_REVISION,
|
||||
[AC_REQUIRE([_AC_INIT_BINSH])dnl
|
||||
[AC_REQUIRE([AC_INIT])dnl
|
||||
AC_DIVERT_PUSH([BINSH])dnl
|
||||
[# From configure.in] translit([$1], $")
|
||||
@%:@ From configure.in translit([$1], $")
|
||||
AC_DIVERT_POP()dnl to KILL
|
||||
])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user