/[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.67 by akim, Sat Sep 28 16:41:15 2002 UTC revision 2.68 by akim, Sun Sep 29 08:14:32 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
1206    m4_pushdef([_m4_expanding($1)])dnl
1207    m4_ifdef([_m4_divert_dump],
1208             [m4_divert_push(m4_defn([_m4_divert_diversion]))],
1209             [m4_copy([_m4_divert_diversion], [_m4_divert_dump])dnl
1210    m4_divert_push([GROW])])dnl
1211  ])  ])
1212    
1213    
# Line 1211  m4_define([_m4_defun_pro], Line 1216  m4_define([_m4_defun_pro],
1216  # The Epilogue for Autoconf macros.  MACRO-NAME only helps tracing  # The Epilogue for Autoconf macros.  MACRO-NAME only helps tracing
1217  # the PRO/EPI pairs.  # the PRO/EPI pairs.
1218  m4_define([_m4_defun_epi],  m4_define([_m4_defun_epi],
1219  [m4_provide([$1])dnl  [m4_divert_pop()dnl
1220    m4_if(_m4_divert_dump, _m4_divert_diversion,
1221          [m4_undivert([GROW])dnl
1222    m4_undefine([_m4_divert_dump])])dnl
1223    m4_expansion_stack_pop()dnl
1224    m4_popdef([_m4_expanding($1)])dnl
1225    m4_provide([$1])dnl
1226  ])  ])
1227    
1228    
# Line 1302  m4_define([m4_before], Line 1313  m4_define([m4_before],
1313  #   `extension' prevents `AC_LANG_COMPILER' from having actual arguments that  #   `extension' prevents `AC_LANG_COMPILER' from having actual arguments that
1314  #   it passes to `AC_LANG_COMPILER(C)'.  #   it passes to `AC_LANG_COMPILER(C)'.
1315  m4_define([m4_require],  m4_define([m4_require],
1316  [m4_provide_if([$1],  [m4_expansion_stack_push(m4_location[: $1 is required by...])dnl
1317    m4_ifdef([_m4_expanding($1)],
1318             [m4_fatal([$0: circular dependency of $1])])dnl
1319    m4_ifndef([_m4_divert_dump],
1320              [m4_fatal([$0: cannot be used outside of an m4_defun'd macro])])dnl
1321    m4_provide_if([$1],
1322                [],                [],
1323                [m4_default([$2], [$1])])                [m4_divert_push(m4_eval(m4_divnum - 1))dnl
1324    m4_default([$2], [$1])
1325    m4_divert(m4_defn([_m4_divert_dump]))dnl
1326    m4_undivert(m4_defn([_m4_divert_diversion]))dnl
1327    m4_divert_pop(m4_defn([_m4_divert_dump]))])dnl
1328    m4_provide_if([$1],
1329                  [],
1330                  [m4_warn([syntax],
1331                           [$1 is m4_require'd but is not m4_defun'd])])dnl
1332    m4_expansion_stack_pop()dnl
1333  ])  ])
1334    
1335    

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

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