[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add AC_REQUIRE_SHELL_FN
From: |
Paolo Bonzini |
Subject: |
[PATCH] Add AC_REQUIRE_SHELL_FN |
Date: |
Sat, 18 Oct 2008 23:59:02 +0200 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
This adds AC_REQUIRE_SHELL_FN, which places the function in a "late"
diversion coming after the processing of --help and --version.
Ok? I'll send out the twelve separate functionization patches soon, too.
Thanks,
Paolo
2008-10-18 Paolo Bonzini <address@hidden>
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/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index beb3104..7c82a0b 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)
@@ -186,6 +191,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. ##
## ----------------------------- ##
- [PATCH] Add AC_REQUIRE_SHELL_FN,
Paolo Bonzini <=