/[autoconf]/autoconf/lib/m4sugar/m4sugar.m4
ViewVC logotype

Diff of /autoconf/lib/m4sugar/m4sugar.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2.66 by akim, Fri May 3 08:26:29 2002 UTC revision 2.67 by akim, Sat Sep 28 16:41:15 2002 UTC
# Line 1202  m4_define([_m4_divert(GROW)],       1000 Line 1202  m4_define([_m4_divert(GROW)],       1000
1202  # -------------------------  # -------------------------
1203  # The prologue for Autoconf macros.  # The prologue for Autoconf macros.
1204  m4_define([_m4_defun_pro],  m4_define([_m4_defun_pro],
1205  [m4_expansion_stack_push(m4_defn([m4_location($1)])[: $1 is expanded from...])dnl  [
 m4_pushdef([_m4_expanding($1)])dnl  
 m4_ifdef([_m4_divert_dump],  
          [m4_divert_push(m4_defn([_m4_divert_diversion]))],  
          [m4_copy([_m4_divert_diversion], [_m4_divert_dump])dnl  
 m4_divert_push([GROW])])dnl  
1206  ])  ])
1207    
1208    
# Line 1216  m4_divert_push([GROW])])dnl Line 1211  m4_divert_push([GROW])])dnl
1211  # The Epilogue for Autoconf macros.  MACRO-NAME only helps tracing  # The Epilogue for Autoconf macros.  MACRO-NAME only helps tracing
1212  # the PRO/EPI pairs.  # the PRO/EPI pairs.
1213  m4_define([_m4_defun_epi],  m4_define([_m4_defun_epi],
1214  [m4_divert_pop()dnl  [m4_provide([$1])dnl
 m4_if(_m4_divert_dump, _m4_divert_diversion,  
       [m4_undivert([GROW])dnl  
 m4_undefine([_m4_divert_dump])])dnl  
 m4_expansion_stack_pop()dnl  
 m4_popdef([_m4_expanding($1)])dnl  
 m4_provide([$1])dnl  
1215  ])  ])
1216    
1217    
# Line 1313  m4_define([m4_before], Line 1302  m4_define([m4_before],
1302  #   `extension' prevents `AC_LANG_COMPILER' from having actual arguments that  #   `extension' prevents `AC_LANG_COMPILER' from having actual arguments that
1303  #   it passes to `AC_LANG_COMPILER(C)'.  #   it passes to `AC_LANG_COMPILER(C)'.
1304  m4_define([m4_require],  m4_define([m4_require],
1305  [m4_expansion_stack_push(m4_location[: $1 is required by...])dnl  [m4_provide_if([$1],
 m4_ifdef([_m4_expanding($1)],  
          [m4_fatal([$0: circular dependency of $1])])dnl  
 m4_ifndef([_m4_divert_dump],  
           [m4_fatal([$0: cannot be used outside of an m4_defun'd macro])])dnl  
 m4_provide_if([$1],  
1306                [],                [],
1307                [m4_divert_push(m4_eval(m4_divnum - 1))dnl                [m4_default([$2], [$1])])
 m4_default([$2], [$1])  
 m4_divert(m4_defn([_m4_divert_dump]))dnl  
 m4_undivert(m4_defn([_m4_divert_diversion]))dnl  
 m4_divert_pop(m4_defn([_m4_divert_dump]))])dnl  
 m4_provide_if([$1],  
               [],  
               [m4_warn([syntax],  
                        [$1 is m4_require'd but is not m4_defun'd])])dnl  
 m4_expansion_stack_pop()dnl  
1308  ])  ])
1309    
1310    

Legend:
Removed from v.2.66  
changed lines
  Added in v.2.67

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26