/[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.73 by akim, Fri May 23 13:58:06 2003 UTC revision 2.74 by akim, Thu Aug 21 17:25:31 2003 UTC
# Line 206  m4_define([m4_assert], Line 206  m4_define([m4_assert],
206  ## ------------- ##  ## ------------- ##
207    
208    
 # m4_warning_ifelse(CATEGORY, IF-TRUE, IF-FALSE)  
 # ----------------------------------------------  
 # If the CATEGORY of warnings is enabled, expand IF_TRUE otherwise  
 # IF-FALSE.  
 #  
 # The variable `m4_warnings' contains a comma separated list of  
 # warnings which order is the converse from the one specified by  
 # the user, i.e., if she specified `-W error,none,obsolete',  
 # `m4_warnings' is `obsolete,none,error'.  We read it from left to  
 # right, and:  
 # - if none or noCATEGORY is met, run IF-FALSE  
 # - if all or CATEGORY is met, run IF-TRUE  
 # - if there is nothing left, run IF-FALSE.  
 m4_define([m4_warning_ifelse],  
 [_m4_warning_ifelse([$1], [$2], [$3], m4_warnings)])  
   
   
 # _m4_warning_ifelse(CATEGORY, IF-TRUE, IF-FALSE, WARNING1, ...)  
 # --------------------------------------------------------------  
 # Implementation of the loop described above.  
 m4_define([_m4_warning_ifelse],  
 [m4_case([$4],  
          [$1],    [$2],  
          [all],   [$2],  
          [],      [$3],  
          [none],  [$3],  
          [no-$1], [$3],  
          [$0([$1], [$2], [$3], m4_shiftn(4, $@))])])  
   
   
 # _m4_warning_error_ifelse(IF-TRUE, IF-FALSE)  
 # -------------------------------------------  
 # The same as m4_warning_ifelse, but scan for `error' only.  
 m4_define([_m4_warning_error_ifelse],  
 [__m4_warning_error_ifelse([$1], [$2], m4_warnings)])  
   
   
 # __m4_warning_error_ifelse(IF-TRUE, IF-FALSE)  
 # --------------------------------------------  
 # The same as _m4_warning_ifelse, but scan for `error' only.  
 m4_define([__m4_warning_error_ifelse],  
 [m4_case([$3],  
          [error],    [$1],  
          [],         [$2],  
          [no-error], [$2],  
          [$0([$1], [$2], m4_shiftn(3, $@))])])  
   
   
   
 # _m4_warn(MESSAGE)  
 # -----------------  
 # Report MESSAGE as a warning, unless the user requested -W error,  
 # in which case report a fatal error.  
 m4_define([_m4_warn],  
 [_m4_warning_error_ifelse([m4_fatal([$1])],  
                           [m4_warning([$1])])])  
   
   
209  # m4_warn(CATEGORY, MESSAGE)  # m4_warn(CATEGORY, MESSAGE)
210  # --------------------------  # --------------------------
211  # Report a MESSAGE to the autoconf user if the CATEGORY of warnings  # Report a MESSAGE to the autoconf user if the CATEGORY of warnings
212  # is requested (in fact, not disabled).  # is requested (in fact, not disabled).  This is for traces only.
213  m4_define([m4_warn],  m4_define([m4_warn], [])
 [m4_warning_ifelse([$1], [_m4_warn([$2])])])  
214    
215    
216    

Legend:
Removed from v.2.73  
changed lines
  Added in v.2.74

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