autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

22-m4-divert-once.patch


From: Akim Demaille
Subject: 22-m4-divert-once.patch
Date: Tue, 23 Jan 2001 02:14:01 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        
        * acgeneral.m4 (AC_EXPAND_ONCE): Remove, use m4_expand_once.
        (AC_DIVERT_ONCE): Move to...
        * m4sugar.m4 (m4_expand_once): here.
        
Index: acgeneral.m4
--- acgeneral.m4 Sun, 21 Jan 2001 17:01:44 +0100 akim (ace/27_acgeneral. 
1.169.8.123 644)
+++ acgeneral.m4 Tue, 23 Jan 2001 01:34:03 +0100 akim (ace/27_acgeneral. 
1.169.8.123 644)
@@ -134,14 +134,6 @@ m4_define([_m4_divert(PREPARE)],       1
 
 
 
-# AC_DIVERT_ONCE(DIVERSION-NAME, CONTENT)
-# ---------------------------------------
-# Output once CONTENT into DIVERSION-NAME (which may be a number
-# actually).  An end of line is appended for free to CONTENT.
-m4_define([AC_DIVERT_ONCE],
-[AC_EXPAND_ONCE([m4_divert_text([$1], [$2])])])
-
-
 # AC_DIVERT_PUSH(DIVERSION-NAME)
 # AC_DIVERT_POP
 # ------------------------------
@@ -201,15 +193,6 @@ m4_define([AC_BEFORE],
 m4_copy([m4_require], [AC_REQUIRE])
 
 
-# AC_EXPAND_ONCE(TEXT)
-# --------------------
-# If TEXT has never been expanded, expand it *here*.
-m4_define([AC_EXPAND_ONCE],
-[m4_expand_once([$1],
-                [],
-                [AC_PROVIDE([$1])[]$1])])
-
-
 # AC_PROVIDE(MACRO-NAME)
 # ----------------------
 # Ideally we should just use `m4_provide($1)', but unfortunately many
@@ -1578,11 +1561,11 @@ m4_define([AC_INIT],
 # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
 # ------------------------------------------------------------------------
 AC_DEFUN([AC_ARG_ENABLE],
-[AC_DIVERT_ONCE([HELP_ENABLE], [[
+[m4_divert_once([HELP_ENABLE], [[
 Optional Features:
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])dnl
-AC_DIVERT_ONCE([HELP_ENABLE], [$2])dnl
+m4_divert_once([HELP_ENABLE], [$2])dnl
 # Check whether --enable-$1 or --disable-$1 was given.
 if test "[${enable_]m4_patsubst([$1], -, _)+set}" = set; then
   enableval="[$enable_]m4_patsubst([$1], -, _)"
@@ -1606,11 +1589,11 @@ AC_DEFUN([AC_ARG_ENABLE],
 # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
 # --------------------------------------------------------------------
 AC_DEFUN([AC_ARG_WITH],
-[AC_DIVERT_ONCE([HELP_WITH], [[
+[m4_divert_once([HELP_WITH], [[
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
-AC_DIVERT_ONCE([HELP_WITH], [$2])dnl
+m4_divert_once([HELP_WITH], [$2])dnl
 # Check whether --with-$1 or --without-$1 was given.
 if test "[${with_]m4_patsubst([$1], -, _)+set}" = set; then
   withval="[$with_]m4_patsubst([$1], -, _)"
@@ -1645,7 +1628,7 @@ AC_DEFUN([AC_ARG_WITH],
 # In subsequent runs, after having loaded the cache, compare
 # ac_cv_env_foo against ac_env_foo.  See _AC_ARG_VAR_VALIDATE.
 m4_define([_AC_ARG_VAR_PRECIOUS],
-[AC_DIVERT_ONCE([PARSE_ARGS],
+[m4_divert_once([PARSE_ARGS],
 [ac_env_$1_set=${$1+set}
 ac_env_$1_value=$$1
 ac_cv_env_$1_set=${$1+set}
@@ -1694,12 +1677,12 @@ m4_define([_AC_ARG_VAR_VALIDATE],
 # Register VARNAME as a precious variable, and document it in
 # `configure --help' (but only once).
 AC_DEFUN([AC_ARG_VAR],
-[AC_DIVERT_ONCE([HELP_VAR], [
-Some influential environment variables:])dnl
-AC_DIVERT_ONCE([HELP_VAR_END], [
+[m4_divert_once([HELP_VAR], [[
+Some influential environment variables:]])dnl
+m4_divert_once([HELP_VAR_END], [
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.])dnl
-AC_DIVERT_ONCE([HELP_VAR], [AC_HELP_STRING([$1], [$2], [              ])])dnl
+m4_divert_once([HELP_VAR], [AC_HELP_STRING([$1], [$2], [              ])])dnl
 _AC_ARG_VAR_PRECIOUS([$1])dnl
 ])# AC_ARG_VAR
 
@@ -2110,7 +2093,7 @@ m4_define([AC_DEFINE_UNQUOTED],
 # If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM
 # to `_AC_SUBST_SED_PROGRAM'.
 m4_define([_AC_SUBST],
-[AC_EXPAND_ONCE([m4_append([_AC_SUBST_SED_PROGRAM],
+[m4_expand_once([m4_append([_AC_SUBST_SED_PROGRAM],
 [$2
 ])])dnl
 ])
Index: aclang.m4
--- aclang.m4 Fri, 19 Jan 2001 20:59:30 +0100 akim (ace/b/32_aclang.m4 1.5.3.72 
644)
+++ aclang.m4 Tue, 23 Jan 2001 01:31:03 +0100 akim (ace/b/32_aclang.m4 1.5.3.72 
644)
@@ -879,8 +879,8 @@ AC_DEFUN([AC_PROG_CC],
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GCC=`test $ac_compiler_gnu = yes && echo yes`
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_PROG_CC_G
 # Some people use a C++ compiler to compile C.  Since we use `exit',
 # in C++ we need to declare it.  In case someone uses the same compiler
@@ -1083,8 +1083,8 @@ AC_DEFUN([AC_PROG_CXX],
 _AC_LANG_COMPILER_WORKS
 _AC_LANG_COMPILER_GNU
 GXX=`test $ac_compiler_gnu = yes && echo yes`
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_PROG_CXX_G
 _AC_PROG_CXX_EXIT_DECLARATION
 AC_LANG_POP(C++)dnl
@@ -1209,8 +1209,8 @@ AC_DEFUN([AC_PROG_F77],
 _AC_LANG_COMPILER_GNU
 ac_ext=$ac_save_ext
 G77=`test $ac_compiler_gnu = yes && echo yes`
-AC_EXPAND_ONCE([_AC_COMPILER_OBJEXT])[]dnl
-AC_EXPAND_ONCE([_AC_COMPILER_EXEEXT])[]dnl
+m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl
+m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
 _AC_PROG_F77_G
 AC_LANG_POP(Fortran 77)dnl
 ])# AC_PROG_F77
Index: acspecific.m4
--- acspecific.m4 Sun, 21 Jan 2001 17:01:44 +0100 akim (ace/25_acspecific 1.120 
666)
+++ acspecific.m4 Tue, 23 Jan 2001 01:31:03 +0100 akim (ace/25_acspecific 1.120 
666)
@@ -724,7 +724,7 @@ AC_DEFUN([_AC_PATH_X],
 # --without-x overrides everything else, but does not touch the cache.
 AC_DEFUN([AC_PATH_X],
 [dnl Document the X abnormal options inherited from history.
-AC_DIVERT_ONCE([HELP_BEGIN], [
+m4_divert_once([HELP_BEGIN], [
 X features:
   --x-includes=DIR    X include files are in DIR
   --x-libraries=DIR   X library files are in DIR])dnl
Index: m4sugar.m4
--- m4sugar.m4 Fri, 19 Jan 2001 20:59:30 +0100 akim (ace/b/27_libm4.m4 1.54 644)
+++ m4sugar.m4 Tue, 23 Jan 2001 01:31:04 +0100 akim (ace/b/27_libm4.m4 1.54 644)
@@ -750,6 +750,14 @@ m4_define([m4_divert_text],
 ])
 
 
+# m4_divert_once(DIVERSION-NAME, CONTENT)
+# ---------------------------------------
+# Output once CONTENT into DIVERSION-NAME (which may be a number
+# actually).  An end of line is appended for free to CONTENT.
+m4_define([m4_divert_once],
+[m4_expand_once([m4_divert_text([$1], [$2])])])
+
+
 # m4_undivert(DIVERSION-NAME)
 # ---------------------------
 # Undivert DIVERSION-NAME.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]