tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/webapp/support wa_util.m4
Date Tue, 14 May 2002 21:45:44 GMT
pier        02/05/14 14:45:43

  Modified:    webapp/support wa_util.m4
  Log:
  More aesthetics changes.
  Now WA_APPEND will check if the specified value is already there (or not)
  to avoid duplicates.
  
  Revision  Changes    Path
  1.6       +28 -3     jakarta-tomcat-connectors/webapp/support/wa_util.m4
  
  Index: wa_util.m4
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/support/wa_util.m4,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- wa_util.m4	3 May 2002 09:38:52 -0000	1.5
  +++ wa_util.m4	14 May 2002 21:45:43 -0000	1.6
  @@ -57,7 +57,7 @@
   
   dnl --------------------------------------------------------------------------
   dnl Author Pier Fumagalli <pier@betaversion.org>
  -dnl Version $Id: wa_util.m4,v 1.5 2002/05/03 09:38:52 pier Exp $
  +dnl Version $Id: wa_util.m4,v 1.6 2002/05/14 21:45:43 pier Exp $
   dnl --------------------------------------------------------------------------
   
   dnl --------------------------------------------------------------------------
  @@ -74,6 +74,18 @@
     ])
   
   dnl --------------------------------------------------------------------------
  +dnl WA_HEADER
  +dnl   Dump an extra header to the standard output
  +dnl   $1 => Message of the header to dump.
  +dnl --------------------------------------------------------------------------
  +AC_DEFUN(
  +  [WA_HEADER],
  +  [
  +    AC_MSG_RESULT([])
  +    AC_MSG_RESULT([$1])
  +  ])
  +
  +dnl --------------------------------------------------------------------------
   dnl WA_VARIABLE
   dnl   Initialize a substituted (global) variable with a zero-length string.
   dnl   $1 => The environment variable name.
  @@ -87,7 +99,8 @@
   
   dnl --------------------------------------------------------------------------
   dnl WA_APPEND
  -dnl   Append the extra value to the variable specified
  +dnl   Append the extra value to the variable specified if and only if the
  +dnl   value is not already in there.
   dnl   $1 => The environment variable name.
   dnl   $2 => The extra value
   dnl --------------------------------------------------------------------------
  @@ -99,9 +112,20 @@
         if test -z "${$1}" ; then
           $1="${wa_append_tempval}"
         else 
  -        $1="${$1} ${wa_append_tempval}"
  +        wa_append_found=""
  +        for wa_append_current in ${$1} ; do
  +          if test "${wa_append_current}" = "${wa_append_tempval}" ; then
  +            wa_append_found="yes"
  +          fi
  +        done
  +        if test -z "${wa_append_found}" ; then
  +          $1="${$1} ${wa_append_tempval}"
  +        fi
  +        unset wa_append_found
  +        unset wa_append_current
         fi
       fi 
  +    unset wa_append_tempval
     ])
   
   dnl --------------------------------------------------------------------------
  @@ -166,6 +190,7 @@
   AC_DEFUN(
     [WA_HELP],
     [
  +    ECHO_N="${ECHO_N} + "
       m4_divert_once(
         [PARSE_ARGS],
         [
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message