]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Add AC_REQUIRE_SHELL_FN and the SHELL_FN diversion.
authorPaolo Bonzini <bonzini@gnu.org>
Sat, 18 Oct 2008 12:37:11 +0000 (14:37 +0200)
committerPaolo Bonzini <bonzini@gnu.org>
Mon, 20 Oct 2008 22:58:59 +0000 (18:58 -0400)
* lib/autoconf/general.m4 (AC_REQUIRE_SHELL_FN): New.
(m4_divert(SHELL_FN)): New.

ChangeLog
lib/autoconf/general.m4

index 81a1f5af42e83696da42b744cceeebcab77a243f..b9d42bf269e7f9fbb381f0281a500e479833792d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 83294c7ef01faf09f551a9d4000f19d86fcbd398..0566dd1c0bac9f2a007ebcf95320a33fb3e5af06 100644 (file)
 # - 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.  ##
 ## ----------------------------- ##