Add AC_REQUIRE_SHELL_FN and the SHELL_FN diversion.

* lib/autoconf/general.m4 (AC_REQUIRE_SHELL_FN): New.
(m4_divert(SHELL_FN)): New.
This commit is contained in:
Paolo Bonzini 2008-10-18 14:37:11 +02:00
parent c8a745ce67
commit 98c907d8de
2 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2008-10-20 Paolo Bonzini <bonzini@gnu.org>
Add AC_REQUIRE_SHELL_FN and the SHELL_FN diversion.
* lib/autoconf/general.m4 (AC_REQUIRE_SHELL_FN): New.
(m4_divert(SHELL_FN)): New.
2008-10-20 Eric Blake <ebb9@byu.net>
Avoid unportable use of echo in testsuite.

View File

@ -104,6 +104,9 @@
# - VERSION_END
# Tail of the handling of --version.
#
# - SHELL_FN
# Shell functions.
#
# - INIT_PREPARE
# Tail of initialization code.
#
@ -146,6 +149,8 @@ m4_define([_m4_divert(VERSION_FSF)], 201)
m4_define([_m4_divert(VERSION_USER)], 202)
m4_define([_m4_divert(VERSION_END)], 203)
m4_define([_m4_divert(SHELL_FN)], 250)
m4_define([_m4_divert(INIT_PREPARE)], 300)
@ -185,6 +190,20 @@ m4_define([AC_OBSOLETE],
## ----------------------------- ##
## Implementing shell functions. ##
## ----------------------------- ##
# AC_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY, [DIVERSION = SHELL_FN]
# ------------------------------------------------------------------------
# Same as AS_REQUIRE_SHELL_FN except that the default diversion comes
# later in the script (speeding up configure --help and --version).
AC_DEFUN([AC_REQUIRE_SHELL_FN],
[AS_REQUIRE_SHELL_FN([$1], [$2], [$3], m4_default_quoted([$4], [SHELL_FN]))])
## ----------------------------- ##
## Implementing Autoconf loops. ##
## ----------------------------- ##