(AC_COPYRIGHT): Factor header comment portion out and move into...
* lib/m4sugar/m4sh.m4 (AS_COPYRIGHT): This.
* lib/autotest/general.at (AT_COPYRIGHT): New macro.
(AT_INIT): Add Autotest copyright notice. Display copyright notices in
--version output.
* tests/local.at: Add Autoconf test suite copyright notice.
* doc/autoconf.texi (Writing testsuite.at): Document AT_COPYRIGHT.
* NEWS: Mention AT_COPYRIGHT.
ac_cv_prog_cc_c99 or ac_cv_prog_cc_c89 (whichever is valid, in
that order).
+** AT_COPYRIGHT
+ New macro for copyright notices in testsuite files.
+
* Major changes in Autoconf 2.59b
Released 2004-08-20, by Paul Eggert.
inherits the package bug report address.
@end defmac
+@defmac AT_COPYRIGHT (@var{copyright-notice})
+@atindex{COPYRIGHT}
+@cindex Copyright Notice
+State that, in addition to the Free Software Foundation's copyright on
+the Autotest macros, parts of your test suite are covered by
+@var{copyright-notice}.
+
+The @var{copyright-notice} will show up in both the head of
+@command{testsuite} and in @samp{testsuite --version}.
+@end defmac
+
@defmac AT_TESTED (@var{executables})
@atindex{TESTED}
Log the file name and answer to @option{--version} of each program in
# It is suggested that the macros in this section appear before
# AC_INIT in `configure.ac'. Nevertheless, this is just stylistic,
-# and from the implementation point of, AC_INIT *must* be expanded
+# and from the implementation point of view, AC_INIT *must* be expanded
# beforehand: it puts data in diversions which must appear before the
# data provided by the macros of this section.
# AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
# ------------------------------------------------------
-# 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.
-# Had we used `# ', the Copyright sent in the beginning of `configure'
-# would have not been evaluated. Another solution, a bit fragile,
-# would have be to use m4_quote to force an evaluation:
-#
-# m4_bpatsubst(m4_quote($1), [^], [# ])
+# Emit TEXT, a copyright notice, in the top of `configure' and in
+# --version output. Macros in TEXT are evaluated once.
m4_define([AC_COPYRIGHT],
-[m4_divert_text([HEADER-COPYRIGHT],
-[m4_bpatsubst([
-$1], [^], [@%:@ ])])dnl
+[AS_COPYRIGHT([$1])[]dnl
m4_divert_text(m4_default([$2], [VERSION_USER]),
[
$1])dnl
# user copyrights, and after the setup of the --version handling.
m4_define([_AC_INIT_COPYRIGHT],
[AC_COPYRIGHT(
-[Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
-2003, 2004, 2005 Free Software Foundation, Inc.
+[Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.],
[VERSION_FSF])dnl
# cases of a case statement.
# - PARSE_ARGS_END
# Finish up the option processing.
+#
# - HELP
# Start printing the help message.
# - HELP_MODES
# User help can be appended to this as self-contained cat'd here-docs.
# - HELP_END
# Finish up the help texts.
+#
+# - VERSION
+# Head of the handling of --version.
+# - VERSION_NOTICES
+# Copyright notices for --version.
+# - VERSION_END
+# Tail of the handling of --version.
+#
# - PREPARE_TESTS
# Like DEFAULTS but run after argument processing for purposes of
# optimization. Do anything else that needs to be done to prepare for
m4_define([_m4_divert(HELP_TUNING)], 302)
m4_define([_m4_divert(HELP_OTHER)], 303)
m4_define([_m4_divert(HELP_END)], 304)
+m4_define([_m4_divert(VERSION)], 350)
+m4_define([_m4_divert(VERSION_NOTICES)], 351)
+m4_define([_m4_divert(VERSION_END)], 352)
m4_define([_m4_divert(PREPARE_TESTS)], 400)
m4_define([_m4_divert(TESTS)], 401)
m4_define([_m4_divert(TESTS_END)], 402)
m4_define([AT_ordinal], 0)
m4_define([AT_banner_ordinal], 0)
AS_INIT
+AT_COPYRIGHT(
+[Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software
+Foundation, Inc.
+This test suite is free software; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.])
AS_PREPARE
m4_divert_push([DEFAULTS])dnl
at_debug_p=false
# Display help message?
at_help_p=false
+# Display the version message?
+at_version_p=false
# List test groups?
at_list_p=false
# Test groups to run
;;
--version | -V )
- echo "$as_me (AT_PACKAGE_STRING)"
- exit 0
+ at_version_p=:
;;
--clean | -c )
exit 0
fi
m4_divert_pop([HELP_END])dnl
+m4_divert_push([VERSION])dnl
+if $at_version_p; then
+ echo "$as_me (AT_PACKAGE_STRING)"
+ cat <<\_ACEOF
+m4_divert_pop([VERSION])dnl
+m4_divert_push([VERSION_END])dnl
+_ACEOF
+ exit 0
+fi
+m4_divert_pop([VERSION_END])dnl
m4_divert_push([PREPARE_TESTS])dnl
# Don't take risks: use only absolute directories in PATH.
])])
+# AT_COPYRIGHT(TEXT)
+# ------------------
+# Emit TEXT, a copyright notice, in the top of the test suite and in
+# --version output. Macros in TEXT are evaluated once.
+m4_define([AT_COPYRIGHT],
+[AS_COPYRIGHT([$1])[]dnl
+m4_divert_text([VERSION_NOTICES],
+[
+$1])])# AT_COPYRIGHT
+
+
# AT_SETUP(DESCRIPTION)
# ---------------------
# Start a group of related tests, all to be executed in the same subshell.
test $exitcode = 0])
+# AS_COPYRIGHT(TEXT)
+# ------------------
+# Emit TEXT, a copyright notice, as a shell comment near the top of the
+# script. TEXT is evaluated once; to accomplish that, we do not prepend
+# `# ' but `@%:@ '.
+m4_define([AS_COPYRIGHT],
+[m4_divert_text([HEADER-COPYRIGHT],
+[m4_bpatsubst([
+$1], [^], [@%:@ ])])])
+
+
# AS_SHELL_SANITIZE
# -----------------
m4_defun([AS_SHELL_SANITIZE],
## ----------------------- ##
AT_INIT
+AT_COPYRIGHT(
+[Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Free Software
+Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.])