autoconf-patches
[Top][All Lists]
Advanced

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

10-m4-pushdef.patch


From: Akim Demaille
Subject: 10-m4-pushdef.patch
Date: 31 Oct 2000 09:45:04 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * m4sugar.m4 (popdef, pushdef): Rename as...
        (m4_popdef, m4_pushdef): these.
        Adjust dependencies.
        * acgeneral.m4: Adjust.
        * aclang.m4: Likewise.
        * autoconf.m4 (popdef, pushdef): Reactive them.
        
        
Index: acgeneral.m4
--- acgeneral.m4 Fri, 27 Oct 2000 21:16:43 +0200 akim (ace/27_acgeneral. 
1.169.8.77 664)
+++ acgeneral.m4 Sun, 29 Oct 2000 23:11:23 +0100 akim (ace/27_acgeneral. 
1.169.8.77 664)
@@ -150,7 +150,7 @@ define([AC_DIVERT_ONCE],
 # Initialize the diversion setup.
 define([_m4_divert_diversion], _m4_divert([BODY]))
 # Throw away output until AC_INIT is called.
-pushdef([_m4_divert_diversion], _m4_divert([KILL]))
+m4_pushdef([_m4_divert_diversion], _m4_divert([KILL]))
 
 
 
@@ -474,15 +474,15 @@ define([AC_VAR_SET_IFELSE],
 define([AC_VAR_PUSHDEF],
 [AC_VAR_INDIR_IFELSE([$2],
                      [ac_$1=AC_TR_SH($2)
-pushdef([$1], [$ac_[$1]])],
-                     [pushdef([$1], [AC_TR_SH($2)])])])
+m4_pushdef([$1], [$ac_[$1]])],
+                     [m4_pushdef([$1], [AC_TR_SH($2)])])])
 
 
 # AC_VAR_POPDEF(VARNAME)
 # ----------------------
 # Free the shell variable accessor VARNAME.  To be dnl'ed.
 define([AC_VAR_POPDEF],
-[popdef([$1])])
+[m4_popdef([$1])])
 
 
 
@@ -593,11 +593,11 @@ define([AC_FOREACH],
 #  column 0                  column 26
 #
 define([AC_HELP_STRING],
-[pushdef([AC_Prefix], m4_default([$3], [                          ]))dnl
-pushdef([AC_Prefix_Format], [  %-]m4_eval(len(AC_Prefix) - 3)[s ])dnl [  %-23s 
]
+[m4_pushdef([AC_Prefix], m4_default([$3], [                          ]))dnl
+m4_pushdef([AC_Prefix_Format], [  %-]m4_eval(len(AC_Prefix) - 3)[s ])dnl [  
%-23s ]
 m4_wrap([$2], AC_Prefix, m4_format(AC_Prefix_Format, [$1]))dnl
-popdef([AC_Prefix_Format])dnl
-popdef([AC_Prefix])dnl
+m4_popdef([AC_Prefix_Format])dnl
+m4_popdef([AC_Prefix])dnl
 ])
 
 
@@ -2666,7 +2666,7 @@ AC_DEFUN([AC_CHECK_TOOLS],
 # No big loss, I think, since most configures don't use this macro anyway.
 AC_DEFUN([AC_PREFIX_PROGRAM],
 [dnl Get an upper case version of $[1].
-pushdef([AC_Prog], m4_toupper([$1]))dnl
+m4_pushdef([AC_Prog], m4_toupper([$1]))dnl
 if test "x$prefix" = xNONE; then
 dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
   echo $ECHO_N "checking for prefix by $ECHO_C" >&AC_FD_MSG
@@ -2675,7 +2675,7 @@ AC_DEFUN([AC_PREFIX_PROGRAM],
     prefix=`AS_DIRNAME([$ac_cv_path_[]AC_Prog])`
   fi
 fi
-popdef([AC_Prog])dnl
+m4_popdef([AC_Prog])dnl
 ])# AC_PREFIX_PROGRAM
 
 
@@ -2778,11 +2778,11 @@ define([AH_CHECK_LIB],
 # is passed `-lfoo'.  However, LIBRARY cannot be a shell variable;
 # it must be a literal name.
 AU_DEFUN([AC_HAVE_LIBRARY],
-[pushdef([AC_Lib_Name],
+[m4_pushdef([AC_Lib_Name],
          patsubst(patsubst([[$1]], [lib\([^\.]*\)\.a], [\1]), [-l], []))dnl
 AC_CHECK_LIB(AC_Lib_Name, main, [$2], [$3], [$4])dnl
 ac_cv_lib_[]AC_Lib_Name()=ac_cv_lib_[]AC_Lib_Name()_main
-popdef([AC_Lib_Name])dnl
+m4_popdef([AC_Lib_Name])dnl
 ])
 
 
@@ -3560,7 +3560,7 @@ define([_AC_CONFIG_DEPENDENCIES],
 define([_AC_CONFIG_UNIQUE],
 [m4_divert_push([KILL])
 AC_FOREACH([AC_File], [$1],
-[pushdef([AC_Dest], patsubst(AC_File, [:.*]))
+[m4_pushdef([AC_Dest], patsubst(AC_File, [:.*]))
 AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_HEADERS],
      [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_HEADER or 
AC_CONFIG_HEADERS.])])
   AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_LINKS],
@@ -3571,7 +3571,7 @@ define([_AC_CONFIG_UNIQUE],
      [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_COMMANDS.])])
   AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_FILES],
      [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_FILES or 
AC_OUTPUT.])])
-popdef([AC_Dest])])
+m4_popdef([AC_Dest])])
 m4_divert_pop()dnl
 ])
 
Index: aclang.m4
--- aclang.m4 Thu, 26 Oct 2000 22:29:39 +0200 akim (ace/b/32_aclang.m4 1.5.3.42 
664)
+++ aclang.m4 Sun, 29 Oct 2000 23:11:33 +0100 akim (ace/b/32_aclang.m4 1.5.3.42 
664)
@@ -125,7 +125,7 @@ AC_DEFUN([AC_LANG],
 # ------------------
 # Save the current language, and use LANG.
 define([AC_LANG_PUSH],
-[pushdef([_AC_LANG])dnl
+[m4_pushdef([_AC_LANG])dnl
 AC_LANG([$1])])
 
 
@@ -133,7 +133,7 @@ define([AC_LANG_PUSH],
 # -----------
 # Restore the previous language.
 define([AC_LANG_POP],
-[popdef([_AC_LANG])dnl
+[m4_popdef([_AC_LANG])dnl
 ifelse(_AC_LANG, [_AC_LANG],
         [AC_FATAL([too many $0])])dnl
 AC_LANG(_AC_LANG)])
@@ -146,7 +146,7 @@ define([AC_LANG_POP],
 [m4_warn([obsolete],
          [instead of using `AC_LANG', `AC_LANG_SAVE',
 and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.])
-pushdef([_AC_LANG], _AC_LANG)])
+m4_pushdef([_AC_LANG], _AC_LANG)])
 
 
 # AC_LANG_RESTORE
Index: autoconf.m4
--- autoconf.m4 Sun, 29 Oct 2000 23:04:39 +0100 akim (ace/28_autoconf.m 1.8 664)
+++ autoconf.m4 Tue, 31 Oct 2000 02:05:44 +0100 akim (ace/28_autoconf.m 1.8 664)
@@ -31,6 +31,8 @@
 
 m4_copy([m4_define],   [define])
 m4_copy([m4_defn],     [defn])
+m4_copy([m4_popdef],   [popdef])
+m4_copy([m4_pushdef],  [pushdef])
 m4_copy([m4_undefine], [undefine])
 
 m4_include(acversion.m4)
Index: autoconf.sh
--- autoconf.sh Sun, 29 Oct 2000 22:58:36 +0100 akim (ace/17_autoconf.s 
1.31.8.26 664)
+++ autoconf.sh Sun, 29 Oct 2000 23:17:22 +0100 akim (ace/17_autoconf.s 
1.31.8.26 664)
@@ -559,7 +559,7 @@
   do
     # The request may be several lines long, hence sed has to quit.
     macro_name=`echo "$trace" | sed 's/:.*//;q'`
-    trace_format=`echo "$trace" | sed '1s/^[^:]*://'`
+    trace_format=`echo "$trace" | sed '1s/^[^:]*:/:/'`
 
     # GNU M4 1.4's tracing of builtins is buggy.  When run on this input:
     #
@@ -594,10 +594,10 @@
     if echo "ifdef(\`$base_name', \`', \`m4exit(-1)')" | m4; then
       # BASE_NAME is a builtin.
       trace_opt="$trace_opt -t $base_name -t m4_$base_name"
-      echo "$base_name:$trace_format" |
+      echo "$base_name$trace_format" |
         $AWK -f $tmp/translate.awk >>$tmp/trace.m4 ||
           { (exit 1); exit; }
-      echo "m4_$base_name:$trace_format" |
+      echo "m4_$base_name$trace_format" |
         $AWK -f $tmp/translate.awk >>$tmp/trace.m4 ||
           { (exit 1); exit; }
     else
Index: m4sugar.m4
--- m4sugar.m4 Sun, 29 Oct 2000 23:04:39 +0100 akim (ace/b/27_libm4.m4 1.27 644)
+++ m4sugar.m4 Sun, 29 Oct 2000 23:08:31 +0100 akim (ace/b/27_libm4.m4 1.27 644)
@@ -95,6 +95,8 @@ define([m4_undefine], defn([undefine]))
 # Rename them a` la `m4 --prefix-builtins'.
 m4_rename([eval],    [m4_eval])
 m4_rename([format],  [m4_format])
+m4_rename([popdef],    [m4_popdef])
+m4_rename([pushdef],   [m4_pushdef])
 m4_rename([shift],   [m4_shift])
 m4_rename([symbols], [m4_symbols])
 
@@ -401,9 +403,9 @@ define([m4_undefine], defn([undefine]))
 # ---------------------
 m4_define([_m4_dumpdefs_up],
 [ifdef([$1],
-       [pushdef([_m4_dumpdefs], m4_defn([$1]))dnl
+       [m4_pushdef([_m4_dumpdefs], m4_defn([$1]))dnl
 dumpdef([$1])dnl
-popdef([$1])dnl
+m4_popdef([$1])dnl
 _m4_dumpdefs_up([$1])])])
 
 
@@ -411,14 +413,14 @@ define([m4_undefine], defn([undefine]))
 # -----------------------
 m4_define([_m4_dumpdefs_down],
 [ifdef([_m4_dumpdefs],
-       [pushdef([$1], m4_defn([_m4_dumpdefs]))dnl
-popdef([_m4_dumpdefs])dnl
+       [m4_pushdef([$1], m4_defn([_m4_dumpdefs]))dnl
+m4_popdef([_m4_dumpdefs])dnl
 _m4_dumpdefs_down([$1])])])
 
 
 # m4_dumpdefs(NAME)
 # -----------------
-# Similar to `dumpdef(NAME)', but if NAME was pushdef'ed, display its
+# Similar to `dumpdef(NAME)', but if NAME was m4_pushdef'ed, display its
 # value stack (most recent displayed first).
 m4_define([m4_dumpdefs],
 [_m4_dumpdefs_up([$1])dnl
@@ -460,11 +462,11 @@ define([m4_undefine], defn([undefine]))
 [m4_case(m4_sign(m4_eval($3 - $2)),
          1, [m4_assert(m4_sign(m4_default($4, 1)) == 1)],
         -1, [m4_assert(m4_sign(m4_default($4, -1)) == -1)])dnl
-pushdef([$1], [$2])dnl
+m4_pushdef([$1], [$2])dnl
 ifelse(m4_eval([$3 > $2]), 1,
        [_m4_for([$1], [$3], m4_default([$4], 1), [$5])],
        [_m4_for([$1], [$3], m4_default([$4], -1), [$5])])dnl
-popdef([$1])])
+m4_popdef([$1])])
 
 m4_define([_m4_for],
 [$4[]dnl
@@ -481,7 +483,7 @@ define([m4_undefine], defn([undefine]))
 #
 # | # foreach(VAR, (LIST), STMT)
 # | m4_define([foreach],
-# |        [pushdef([$1])_foreach([$1], [$2], [$3])popdef([$1])])
+# |        [m4_pushdef([$1])_foreach([$1], [$2], [$3])m4_popdef([$1])])
 # | m4_define([_arg1], [$1])
 # | m4_define([_foreach],
 # |          [ifelse([$2], [()], ,
@@ -511,7 +513,7 @@ define([m4_undefine], defn([undefine]))
 # apply to the maintenance of m4sugar!).
 #
 # | # foreach(VAR, (LIST), STMT)
-# | m4_define([foreach], [pushdef([$1])_foreach($@)popdef([$1])])
+# | m4_define([foreach], [m4_pushdef([$1])_foreach($@)m4_popdef([$1])])
 # | m4_define([_arg1], [[$1]])
 # | m4_define([_foreach],
 # |  [ifelse($2, [()], ,
@@ -536,7 +538,7 @@ define([m4_undefine], defn([undefine]))
 # simplifies the use:
 #
 # | # foreach(VAR, (LIST), STMT)
-# | m4_define([foreach], [pushdef([$1])_foreach($@)popdef([$1])])
+# | m4_define([foreach], [m4_pushdef([$1])_foreach($@)m4_popdef([$1])])
 # | m4_define([_arg1], [$1])
 # | m4_define([_foreach],
 # |  [ifelse($2, [], ,
@@ -569,7 +571,7 @@ define([m4_undefine], defn([undefine]))
 #      | m4_foreach(Var, [[[active]], [[active]]], [-Var-])
 #     => -active--active-
 m4_define([m4_foreach],
-[pushdef([$1])_m4_foreach($@)popdef([$1])])
+[m4_pushdef([$1])_m4_foreach($@)m4_popdef([$1])])
 
 # Low level macros used to define m4_foreach.
 m4_define([m4_car], [$1])
@@ -600,7 +602,7 @@ define([m4_undefine], defn([undefine]))
 # ------------------------------
 # Change the diversion stream to DIVERSION-NAME, while stacking old values.
 m4_define([m4_divert_push],
-[pushdef([_m4_divert_diversion], _m4_divert([$1]))dnl
+[m4_pushdef([_m4_divert_diversion], _m4_divert([$1]))dnl
 divert(_m4_divert_diversion)dnl
 ])
 
@@ -609,7 +611,7 @@ define([m4_undefine], defn([undefine]))
 # -------------
 # Change the diversion stream to its previous value, unstacking it.
 m4_define([m4_divert_pop],
-[popdef([_m4_divert_diversion])dnl
+[m4_popdef([_m4_divert_diversion])dnl
 ifndef([_m4_divert_diversion],
        [m4_fatal([too many m4_divert_pop])])dnl
 divert(_m4_divert_diversion)dnl
@@ -937,8 +939,8 @@ define([m4_undefine], defn([undefine]))
 # not for define'd macros.
 #
 # The scheme is simplistic: each time we enter an m4_defun'd macros,
-# we pushdef its name in _m4_expansion_stack, and when we exit the
-# macro, we popdef _m4_expansion_stack.
+# we m4_pushdef its name in _m4_expansion_stack, and when we exit the
+# macro, we m4_popdef _m4_expansion_stack.
 #
 # In addition, we want to use the expansion stack to detect circular
 # m4_require dependencies.  This means we need to browse the stack to
@@ -983,7 +985,7 @@ define([m4_undefine], defn([undefine]))
 m4_define([m4_expansion_stack_dump],
 [ifdef([_m4_expansion_stack],
        [m4_errprint(m4_defn([_m4_expansion_stack]))dnl
-popdef([_m4_expansion_stack])dnl
+m4_popdef([_m4_expansion_stack])dnl
 m4_expansion_stack_dump()],
        [m4_errprint(m4_location[: the top level])])])
 
@@ -992,9 +994,9 @@ define([m4_undefine], defn([undefine]))
 # -------------------------
 # The prologue for Autoconf macros.
 m4_define([_m4_defun_pro],
-[pushdef([_m4_expansion_stack],
+[m4_pushdef([_m4_expansion_stack],
          m4_defn([m4_location($1)])[: $1 is expanded from...])dnl
-pushdef([_m4_expanding($1)])dnl
+m4_pushdef([_m4_expanding($1)])dnl
 ifdef([_m4_divert_dump],
       [m4_divert_push(m4_defn([_m4_divert_diversion]))],
       [m4_copy([_m4_divert_diversion], [_m4_divert_dump])dnl
@@ -1011,8 +1013,8 @@ define([m4_undefine], defn([undefine]))
 ifelse(_m4_divert_dump, _m4_divert_diversion,
        [undivert(_m4_divert([GROW]))dnl
 m4_undefine([_m4_divert_dump])])dnl
-popdef([_m4_expansion_stack])dnl
-popdef([_m4_expanding($1)])dnl
+m4_popdef([_m4_expansion_stack])dnl
+m4_popdef([_m4_expanding($1)])dnl
 m4_provide([$1])dnl
 ])
 
@@ -1086,7 +1088,7 @@ define([m4_undefine], defn([undefine]))
 #   `extension' prevents `AC_LANG_COMPILER' from having actual arguments that
 #   it passes to `AC_LANG_COMPILER(C)'.
 m4_define([_m4_require],
-[pushdef([_m4_expansion_stack],
+[m4_pushdef([_m4_expansion_stack],
          m4_location[: $1 is required by...])dnl
 ifdef([_m4_expanding($1)],
       [m4_fatal([m4_require: circular dependency of $1])])dnl
@@ -1102,7 +1104,7 @@ define([m4_undefine], defn([undefine]))
                   [],
                   [m4_warn([syntax],
                            [$1 is m4_require'd but is not m4_defun'd])])dnl
-popdef([_m4_expansion_stack])dnl
+m4_popdef([_m4_expansion_stack])dnl
 ])
 
 
@@ -1288,7 +1290,7 @@ define([m4_undefine], defn([undefine]))
 # FIXME: This macro should not exists.  Currently it's used only in
 # m4_wrap, which needs to be rewritten.  But it's godam hard.
 m4_define([m4_foreach_quoted],
-[pushdef([$1], [])_m4_foreach_quoted($@)popdef([$1])])
+[m4_pushdef([$1], [])_m4_foreach_quoted($@)m4_popdef([$1])])
 
 # Low level macros used to define m4_foreach.
 m4_define([m4_car_quoted], [[$1]])
@@ -1337,11 +1339,11 @@ define([m4_undefine], defn([undefine]))
 # words are preceded by m4_Separator which is defined to empty for the
 # first word, and then ` ' (single space) for all the others.
 m4_define([m4_wrap],
-[pushdef([m4_Prefix], m4_default([$2], []))dnl
-pushdef([m4_Prefix1], m4_default([$3], [m4_Prefix]))dnl
-pushdef([m4_Width], m4_default([$4], 79))dnl
-pushdef([m4_Cursor], len(m4_Prefix1))dnl
-pushdef([m4_Separator], [])dnl
+[m4_pushdef([m4_Prefix], m4_default([$2], []))dnl
+m4_pushdef([m4_Prefix1], m4_default([$3], [m4_Prefix]))dnl
+m4_pushdef([m4_Width], m4_default([$4], 79))dnl
+m4_pushdef([m4_Cursor], len(m4_Prefix1))dnl
+m4_pushdef([m4_Separator], [])dnl
 m4_Prefix1[]dnl
 ifelse(m4_eval(m4_Cursor > len(m4_Prefix)),
        1, [m4_define([m4_Cursor], len(m4_Prefix))
@@ -1356,11 +1358,11 @@ define([m4_undefine], defn([undefine]))
        [m4_Separator])[]dnl
 m4_Word[]dnl
 m4_define([m4_Separator], [ ])])dnl
-popdef([m4_Separator])dnl
-popdef([m4_Cursor])dnl
-popdef([m4_Width])dnl
-popdef([m4_Prefix1])dnl
-popdef([m4_Prefix])dnl
+m4_popdef([m4_Separator])dnl
+m4_popdef([m4_Cursor])dnl
+m4_popdef([m4_Width])dnl
+m4_popdef([m4_Prefix1])dnl
+m4_popdef([m4_Prefix])dnl
 ])
 
 



reply via email to

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