From: Paolo Bonzini Date: Sat, 18 Oct 2008 12:37:11 +0000 (+0200) Subject: Add AC_REQUIRE_SHELL_FN and the SHELL_FN diversion. X-Git-Tag: v2.63b~228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98c907d8de4b550e056d292510588c4852967bc1;p=thirdparty%2Fautoconf.git Add AC_REQUIRE_SHELL_FN and the SHELL_FN diversion. * lib/autoconf/general.m4 (AC_REQUIRE_SHELL_FN): New. (m4_divert(SHELL_FN)): New. --- diff --git a/ChangeLog b/ChangeLog index 81a1f5af..b9d42bf2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-10-20 Paolo Bonzini + + 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 Avoid unportable use of echo in testsuite. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 83294c7e..0566dd1c 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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. ## ## ----------------------------- ##