Provide a means to specify more Copyright information in

`configure'.  And after all, it suits to `configure --version' too.

* acgeneral.m4 (AC_DIVERSION_DEFAULTS, AC_DIVERSION_INIT_PREPARE):
New diversion numbers.
(AC_DIVERSION_INIT): Renamed as...
(AC_DIVERSION_INIT_PARSE_ARGS): this.
(AC_DIVERT_POP): Instead of going into wild endless loops when
there are more pops than pushes, die with dignity.
(AC_COPYRIGHT): New macro.
(_AC_INIT_NOTICE): Move definition of `ac_includes_default' from
here...
(_AC_INIT_PREPARE): to here.
(_AC_INIT_NOTICE): Remove.
(AC_INIT): Use it to install Autoconf's Copyright.
(_AC_INIT_DEFAULTS): New macro.
(AC_INIT): Use it.
(AC_PREFIX_DEFAULTS): Dump in AC_DIVERSION_DEFAULTS.
(_AC_INIT_PARSE_ARGS): Dump in AC_DIVERSION_INIT_PREPARE.
This commit is contained in:
Akim Demaille 2000-03-08 13:22:42 +00:00
parent e91ec0e779
commit 2e59cf5180
4 changed files with 153 additions and 80 deletions

View File

@ -11,6 +11,28 @@
(_AC_INIT_DEFAULTS): New macro.
(AC_INIT): Use it.
2000-03-08 Akim Demaille <akim@epita.fr>
Provide a means to specify more Copyright information in
`configure'. And after all, it suits to `configure --version' too.
* acgeneral.m4 (AC_DIVERSION_DEFAULTS, AC_DIVERSION_INIT_PREPARE):
New diversion numbers.
(AC_DIVERSION_INIT): Renamed as...
(AC_DIVERSION_INIT_PARSE_ARGS): this.
(AC_DIVERT_POP): Instead of going into wild endless loops when
there are more pops than pushes, die with dignity.
(AC_COPYRIGHT): New macro.
(_AC_INIT_NOTICE): Move definition of `ac_includes_default' from
here...
(_AC_INIT_PREPARE): to here.
(_AC_INIT_NOTICE): Remove.
(AC_INIT): Use it to install Autoconf's Copyright.
(_AC_INIT_DEFAULTS): New macro.
(AC_INIT): Use it.
(AC_PREFIX_DEFAULTS): Dump in AC_DIVERSION_DEFAULTS.
(_AC_INIT_PARSE_ARGS): Dump in AC_DIVERSION_INIT_PREPARE.
2000-03-08 Akim Demaille <akim@epita.fr>
We don't need _AC_ARG_*_HELP_PROLOGUE.

3
TODO
View File

@ -16,6 +16,9 @@ easy), or remove (obsoleted since then).
** AU_, AH_
Document.
** AC_COPYRIGHT
Document.
** m4
The error messages for indir and dumpdef are uselessly different. Fix
this for translators.

View File

@ -61,22 +61,25 @@ m4_namespace_push(autoconf)
# m4 output diversions. We let m4 output them all in order at the end,
# except that we explicitly undivert AC_DIVERSION_ICMDS.
define(AC_DIVERSION_KILL, -1)# suppress output
define(AC_DIVERSION_BINSH, 0)# AC_REQUIRE'd #! /bin/sh line
define(AC_DIVERSION_NOTICE, 1)# copyright notice
define(AC_DIVERSION_DEFAULTS, 2)# early initializations (defaults)
define(AC_DIVERSION_INIT, 3)# initialization code
define(AC_DIVERSION_HELP_BEGIN, 4)# Handling `configure --help'
define(AC_DIVERSION_HELP_ENABLE, 5)# Help msg from AC_ARG_ENABLE
define(AC_DIVERSION_HELP_WITH, 6)# Help msg from AC_ARG_WITH
define(AC_DIVERSION_HELP_VAR, 7)# Help msg from AC_ARG_VAR
define(AC_DIVERSION_HELP_END, 8)# Tail of the handling of --help
define(AC_DIVERSION_NORMAL_4, 9)# AC_REQUIRE'd code, 4 level deep
define(AC_DIVERSION_NORMAL_3, 10)# AC_REQUIRE'd code, 3 level deep
define(AC_DIVERSION_NORMAL_2, 11)# AC_REQUIRE'd code, 2 level deep
define(AC_DIVERSION_NORMAL_1, 12)# AC_REQUIRE'd code, 1 level deep
define(AC_DIVERSION_NORMAL, 13)# the tests and output code
define(AC_DIVERSION_ICMDS, 14)# extra initialization in config.status
define(AC_DIVERSION_KILL, -1)# suppress output
define(AC_DIVERSION_BINSH, 0)# AC_REQUIRE'd #! /bin/sh line
define(AC_DIVERSION_NOTICE, 1)# copyright notice
define(AC_DIVERSION_DEFAULTS, 2)# early initializations (defaults)
define(AC_DIVERSION_INIT_PARSE_ARGS, 3)# initialization code
define(AC_DIVERSION_HELP_BEGIN, 4)# Handling `configure --help'
define(AC_DIVERSION_HELP_ENABLE, 5)# Help msg from AC_ARG_ENABLE
define(AC_DIVERSION_HELP_WITH, 6)# Help msg from AC_ARG_WITH
define(AC_DIVERSION_HELP_VAR, 7)# Help msg from AC_ARG_VAR
define(AC_DIVERSION_HELP_END, 8)# Tail of the handling of --help
define(AC_DIVERSION_VERSION_BEGIN, 9)# Copyright notice for --version.
define(AC_DIVERSION_VERSION_END, 10)# Tail of the handling of --version.
define(AC_DIVERSION_INIT_PREPARE, 11)# trail of initialization code
define(AC_DIVERSION_NORMAL_4, 12)# AC_REQUIRE'd code, 4 level deep
define(AC_DIVERSION_NORMAL_3, 13)# AC_REQUIRE'd code, 3 level deep
define(AC_DIVERSION_NORMAL_2, 14)# AC_REQUIRE'd code, 2 level deep
define(AC_DIVERSION_NORMAL_1, 15)# AC_REQUIRE'd code, 1 level deep
define(AC_DIVERSION_NORMAL, 16)# the tests and output code
define(AC_DIVERSION_ICMDS, 17)# extra initialization in config.status
# AC_DIVERT_PUSH(STREAM)
@ -93,6 +96,9 @@ divert(AC_DIVERSION_CURRENT)dnl
# Change the diversion stream to its previous value, unstacking it.
define(AC_DIVERT_POP,
[popdef([AC_DIVERSION_CURRENT])dnl
ifelse(AC_DIVERSION_CURRENT,
[AC_DIVERSION_CURRENT],
[AC_FATAL([too many AC_DIVERT_POP])])dnl
divert(AC_DIVERSION_CURRENT)dnl
])
@ -544,19 +550,20 @@ AC_DIVERT_POP()dnl to KILL
])
# _AC_INIT_NOTICE
# --------------
AC_DEFUN(_AC_INIT_NOTICE,
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using Autoconf version ]AC_ACVERSION[
# Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
# Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# AC_COPYRIGHT(TEXT)
# ------------------
# Append Copyright information in the top of `configure'.
# _AC_INIT_VERSION must be run before, exactly like _AC_INIT_BINSH must
# be run before AC_REVISION.
AC_DEFUN(AC_COPYRIGHT,
[AC_REQUIRE([_AC_INIT_VERSION])dnl
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
$1
AC_DIVERT_POP()dnl
])# _AC_INIT_NOTICE
AC_DIVERT_PUSH(AC_DIVERSION_VERSION_BEGIN)dnl
$1
AC_DIVERT_POP()dnl
])# _AC_INIT_COPYRIGHT
# _AC_INIT_DEFAULTS
@ -581,8 +588,9 @@ AC_DIVERT_POP()])
# _AC_INIT_PARSE_ARGS
# -------------------
AC_DEFUN(AC_INIT_PARSE_ARGS,
[[
AC_DEFUN(_AC_INIT_PARSE_ARGS,
[AC_DIVERT_PUSH(AC_DIVERSION_INIT_PARSE_ARGS)dnl
[
# Initialize some variables set by options.
ac_init_help=false
ac_init_version=false
@ -931,7 +939,9 @@ done
if test -n "$ac_prev"; then
]AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)[
fi
]])# _AC_INIT_PARSE_ARGS
]dnl
AC_DIVERT_POP()dnl
])# _AC_INIT_PARSE_ARGS
# _AC_INIT_HELP
@ -1006,11 +1016,17 @@ AC_DIVERT_POP()dnl
# _AC_INIT_VERSION
# ----------------
# Handle the `configure --version' message.
define([_AC_INIT_VERSION],
[if $ac_init_version; then
echo "configure generated by autoconf version AC_ACVERSION"
AC_DEFUN([_AC_INIT_VERSION],
[AC_DIVERT_PUSH(AC_DIVERSION_VERSION_BEGIN)dnl
if $ac_init_version; then
sed -e 's/^# *//' <<\EOF
AC_DIVERT_POP()dnl
AC_DIVERT_PUSH(AC_DIVERSION_VERSION_END)dnl
EOF
exit 0
fi])# _AC_INIT_VERSION
fi
AC_DIVERT_POP()dnl
])# _AC_INIT_VERSION
# AC_INCLUDE(FILE)
@ -1037,7 +1053,8 @@ define(AC_INCLUDES,
# UNIQUE-FILE-IN-SOURCE-DIR.
# 6. Required macros (cache, default AC_SUBST etc.)
AC_DEFUN([_AC_INIT_PREPARE],
[trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
[AC_DIVERT_PUSH(AC_DIVERSION_INIT_PREPARE)dnl
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
# 0 standard input
@ -1192,6 +1209,7 @@ AC_SUBST(includedir)dnl
AC_SUBST(oldincludedir)dnl
AC_SUBST(infodir)dnl
AC_SUBST(mandir)dnl
AC_DIVERT_POP()dnl
])# _AC_INIT_PREPARE
@ -1202,15 +1220,21 @@ AC_DEFUN(AC_INIT,
[m4_sinclude(acsite.m4)dnl
m4_sinclude(./aclocal.m4)dnl
AC_REQUIRE([_AC_INIT_BINSH])dnl
_AC_INIT_NOTICE()dnl
AC_COPYRIGHT(
[# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using Autoconf version ]AC_ACVERSION[.
# Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
# 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_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
_AC_INIT_PARSE_ARGS
_AC_INIT_HELP
_AC_INIT_VERSION
AC_REQUIRE([_AC_INIT_VERSION])dnl
_AC_INIT_PREPARE([$1])dnl
AC_DIVERT_POP()dnl to NORMAL
])

View File

@ -61,22 +61,25 @@ m4_namespace_push(autoconf)
# m4 output diversions. We let m4 output them all in order at the end,
# except that we explicitly undivert AC_DIVERSION_ICMDS.
define(AC_DIVERSION_KILL, -1)# suppress output
define(AC_DIVERSION_BINSH, 0)# AC_REQUIRE'd #! /bin/sh line
define(AC_DIVERSION_NOTICE, 1)# copyright notice
define(AC_DIVERSION_DEFAULTS, 2)# early initializations (defaults)
define(AC_DIVERSION_INIT, 3)# initialization code
define(AC_DIVERSION_HELP_BEGIN, 4)# Handling `configure --help'
define(AC_DIVERSION_HELP_ENABLE, 5)# Help msg from AC_ARG_ENABLE
define(AC_DIVERSION_HELP_WITH, 6)# Help msg from AC_ARG_WITH
define(AC_DIVERSION_HELP_VAR, 7)# Help msg from AC_ARG_VAR
define(AC_DIVERSION_HELP_END, 8)# Tail of the handling of --help
define(AC_DIVERSION_NORMAL_4, 9)# AC_REQUIRE'd code, 4 level deep
define(AC_DIVERSION_NORMAL_3, 10)# AC_REQUIRE'd code, 3 level deep
define(AC_DIVERSION_NORMAL_2, 11)# AC_REQUIRE'd code, 2 level deep
define(AC_DIVERSION_NORMAL_1, 12)# AC_REQUIRE'd code, 1 level deep
define(AC_DIVERSION_NORMAL, 13)# the tests and output code
define(AC_DIVERSION_ICMDS, 14)# extra initialization in config.status
define(AC_DIVERSION_KILL, -1)# suppress output
define(AC_DIVERSION_BINSH, 0)# AC_REQUIRE'd #! /bin/sh line
define(AC_DIVERSION_NOTICE, 1)# copyright notice
define(AC_DIVERSION_DEFAULTS, 2)# early initializations (defaults)
define(AC_DIVERSION_INIT_PARSE_ARGS, 3)# initialization code
define(AC_DIVERSION_HELP_BEGIN, 4)# Handling `configure --help'
define(AC_DIVERSION_HELP_ENABLE, 5)# Help msg from AC_ARG_ENABLE
define(AC_DIVERSION_HELP_WITH, 6)# Help msg from AC_ARG_WITH
define(AC_DIVERSION_HELP_VAR, 7)# Help msg from AC_ARG_VAR
define(AC_DIVERSION_HELP_END, 8)# Tail of the handling of --help
define(AC_DIVERSION_VERSION_BEGIN, 9)# Copyright notice for --version.
define(AC_DIVERSION_VERSION_END, 10)# Tail of the handling of --version.
define(AC_DIVERSION_INIT_PREPARE, 11)# trail of initialization code
define(AC_DIVERSION_NORMAL_4, 12)# AC_REQUIRE'd code, 4 level deep
define(AC_DIVERSION_NORMAL_3, 13)# AC_REQUIRE'd code, 3 level deep
define(AC_DIVERSION_NORMAL_2, 14)# AC_REQUIRE'd code, 2 level deep
define(AC_DIVERSION_NORMAL_1, 15)# AC_REQUIRE'd code, 1 level deep
define(AC_DIVERSION_NORMAL, 16)# the tests and output code
define(AC_DIVERSION_ICMDS, 17)# extra initialization in config.status
# AC_DIVERT_PUSH(STREAM)
@ -93,6 +96,9 @@ divert(AC_DIVERSION_CURRENT)dnl
# Change the diversion stream to its previous value, unstacking it.
define(AC_DIVERT_POP,
[popdef([AC_DIVERSION_CURRENT])dnl
ifelse(AC_DIVERSION_CURRENT,
[AC_DIVERSION_CURRENT],
[AC_FATAL([too many AC_DIVERT_POP])])dnl
divert(AC_DIVERSION_CURRENT)dnl
])
@ -544,19 +550,20 @@ AC_DIVERT_POP()dnl to KILL
])
# _AC_INIT_NOTICE
# --------------
AC_DEFUN(_AC_INIT_NOTICE,
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using Autoconf version ]AC_ACVERSION[
# Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
# Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
# AC_COPYRIGHT(TEXT)
# ------------------
# Append Copyright information in the top of `configure'.
# _AC_INIT_VERSION must be run before, exactly like _AC_INIT_BINSH must
# be run before AC_REVISION.
AC_DEFUN(AC_COPYRIGHT,
[AC_REQUIRE([_AC_INIT_VERSION])dnl
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
$1
AC_DIVERT_POP()dnl
])# _AC_INIT_NOTICE
AC_DIVERT_PUSH(AC_DIVERSION_VERSION_BEGIN)dnl
$1
AC_DIVERT_POP()dnl
])# _AC_INIT_COPYRIGHT
# _AC_INIT_DEFAULTS
@ -581,8 +588,9 @@ AC_DIVERT_POP()])
# _AC_INIT_PARSE_ARGS
# -------------------
AC_DEFUN(AC_INIT_PARSE_ARGS,
[[
AC_DEFUN(_AC_INIT_PARSE_ARGS,
[AC_DIVERT_PUSH(AC_DIVERSION_INIT_PARSE_ARGS)dnl
[
# Initialize some variables set by options.
ac_init_help=false
ac_init_version=false
@ -931,7 +939,9 @@ done
if test -n "$ac_prev"; then
]AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)[
fi
]])# _AC_INIT_PARSE_ARGS
]dnl
AC_DIVERT_POP()dnl
])# _AC_INIT_PARSE_ARGS
# _AC_INIT_HELP
@ -1006,11 +1016,17 @@ AC_DIVERT_POP()dnl
# _AC_INIT_VERSION
# ----------------
# Handle the `configure --version' message.
define([_AC_INIT_VERSION],
[if $ac_init_version; then
echo "configure generated by autoconf version AC_ACVERSION"
AC_DEFUN([_AC_INIT_VERSION],
[AC_DIVERT_PUSH(AC_DIVERSION_VERSION_BEGIN)dnl
if $ac_init_version; then
sed -e 's/^# *//' <<\EOF
AC_DIVERT_POP()dnl
AC_DIVERT_PUSH(AC_DIVERSION_VERSION_END)dnl
EOF
exit 0
fi])# _AC_INIT_VERSION
fi
AC_DIVERT_POP()dnl
])# _AC_INIT_VERSION
# AC_INCLUDE(FILE)
@ -1037,7 +1053,8 @@ define(AC_INCLUDES,
# UNIQUE-FILE-IN-SOURCE-DIR.
# 6. Required macros (cache, default AC_SUBST etc.)
AC_DEFUN([_AC_INIT_PREPARE],
[trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
[AC_DIVERT_PUSH(AC_DIVERSION_INIT_PREPARE)dnl
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
# 0 standard input
@ -1192,6 +1209,7 @@ AC_SUBST(includedir)dnl
AC_SUBST(oldincludedir)dnl
AC_SUBST(infodir)dnl
AC_SUBST(mandir)dnl
AC_DIVERT_POP()dnl
])# _AC_INIT_PREPARE
@ -1202,15 +1220,21 @@ AC_DEFUN(AC_INIT,
[m4_sinclude(acsite.m4)dnl
m4_sinclude(./aclocal.m4)dnl
AC_REQUIRE([_AC_INIT_BINSH])dnl
_AC_INIT_NOTICE()dnl
AC_COPYRIGHT(
[# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using Autoconf version ]AC_ACVERSION[.
# Copyright (C) 1992, 93, 94, 95, 96, 98, 99, 2000
# 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_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
_AC_INIT_PARSE_ARGS
_AC_INIT_HELP
_AC_INIT_VERSION
AC_REQUIRE([_AC_INIT_VERSION])dnl
_AC_INIT_PREPARE([$1])dnl
AC_DIVERT_POP()dnl to NORMAL
])