cvs commit: jakarta-tomcat-connectors/webapp/support wa_util.m4

2002-05-14 Thread pier

pier02/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  ChangesPath
  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.m43 May 2002 09:38:52 -   1.5
  +++ wa_util.m414 May 2002 21:45:43 -  1.6
  @@ -57,7 +57,7 @@
   
   dnl --
   dnl Author Pier Fumagalli [EMAIL PROTECTED]
  -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:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/webapp/support wa_util.m4

2002-05-01 Thread pier

pier02/05/01 08:29:36

  Modified:webapp/support wa_util.m4
  Log:
  Added check if weird characters are in the specified directory when trying
  to resolve its full path (like, newlines at the end and such, M4 sucks).
  
  Revision  ChangesPath
  1.2   +6 -4  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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wa_util.m41 May 2002 00:31:07 -   1.1
  +++ wa_util.m41 May 2002 15:29:36 -   1.2
  @@ -57,7 +57,7 @@
   
   dnl --
   dnl Author Pier Fumagalli [EMAIL PROTECTED]
  -dnl Version $Id: wa_util.m4,v 1.1 2002/05/01 00:31:07 pier Exp $
  +dnl Version $Id: wa_util.m4,v 1.2 2002/05/01 15:29:36 pier Exp $
   dnl --
   
   dnl --
  @@ -96,9 +96,10 @@
 [WA_PATH_DIR],
 [
   AC_MSG_CHECKING([for $3 path])
  -if test -d $2 ; then
  +tempval=`echo $2`
  +if test -d ${tempval} ; then
 curdir=`pwd`
  -  cd $2
  +  cd ${tempval}
 newdir=`pwd`
 $1=${newdir}
 AC_SUBST($1)
  @@ -107,8 +108,9 @@
 unset curdir
 unset newdir
   else
  -  WA_ERROR([directory $2 not found])
  +  WA_ERROR([directory ${tempval} not found])
   fi
  +unset tempval
 ])
   
   dnl --
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/webapp/support wa_util.m4

2002-05-01 Thread pier

pier02/05/01 11:05:37

  Modified:webapp/support wa_util.m4
  Log:
  Localization of variable names within M4 macros (darn, there's no stack)
  
  Revision  ChangesPath
  1.3   +13 -14jakarta-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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- wa_util.m41 May 2002 15:29:36 -   1.2
  +++ wa_util.m41 May 2002 18:05:37 -   1.3
  @@ -57,7 +57,7 @@
   
   dnl --
   dnl Author Pier Fumagalli [EMAIL PROTECTED]
  -dnl Version $Id: wa_util.m4,v 1.2 2002/05/01 15:29:36 pier Exp $
  +dnl Version $Id: wa_util.m4,v 1.3 2002/05/01 18:05:37 pier Exp $
   dnl --
   
   dnl --
  @@ -96,21 +96,20 @@
 [WA_PATH_DIR],
 [
   AC_MSG_CHECKING([for $3 path])
  -tempval=`echo $2`
  -if test -d ${tempval} ; then
  -  curdir=`pwd`
  -  cd ${tempval}
  -  newdir=`pwd`
  -  $1=${newdir}
  -  AC_SUBST($1)
  -  AC_MSG_RESULT([${newdir}])
  -  cd ${curdir}
  -  unset curdir
  -  unset newdir
  +wa_path_dir_tempval=`echo $2`
  +if test -d ${wa_path_dir_tempval} ; then
  +  wa_path_dir_curdir=`pwd`
  +  cd ${wa_path_dir_tempval}
  +  wa_path_dir_newdir=`pwd`
  +  $1=${wa_path_dir_newdir}
  +  AC_MSG_RESULT([${wa_path_dir_newdir}])
  +  cd ${wa_path_dir_curdir}
  +  unset wa_path_dir_curdir
  +  unset wa_path_dir_newdir
   else
  -  WA_ERROR([directory ${tempval} not found])
  +  WA_ERROR([directory ${wa_path_dir_tempval} not found])
   fi
  -unset tempval
  +unset wa_path_dir_tempval
 ])
   
   dnl --
  
  
  

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




cvs commit: jakarta-tomcat-connectors/webapp/support wa_util.m4

2002-04-30 Thread pier

pier02/04/30 17:31:07

  Added:   webapp/support wa_util.m4
  Log:
  Various M4 utilities we'll need in configure.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-connectors/webapp/support/wa_util.m4
  
  Index: wa_util.m4
  ===
  dnl  =
  dnl
  dnl  The Apache Software License,  Version 1.1
  dnl
  dnl   Copyright (c) 1999-2001 The Apache Software Foundation.
  dnlAll rights reserved.
  dnl
  dnl  =
  dnl
  dnl  Redistribution and use in source and binary forms,  with or without modi-
  dnl  fication, are permitted provided that the following conditions are met:
  dnl
  dnl  1. Redistributions of source code  must retain the above copyright notice
  dnl notice, this list of conditions and the following disclaimer.
  dnl
  dnl  2. Redistributions  in binary  form  must  reproduce the  above copyright
  dnl notice,  this list of conditions  and the following  disclaimer in the
  dnl documentation and/or other materials provided with the distribution.
  dnl
  dnl  3. The end-user documentation  included with the redistribution,  if any,
  dnl must include the following acknowlegement:
  dnl
  dnlThis product includes  software developed  by the Apache  Software
  dnl Foundation http://www.apache.org/.
  dnl
  dnl Alternately, this acknowlegement may appear in the software itself, if
  dnl and wherever such third-party acknowlegements normally appear.
  dnl
  dnl  4. The names The Jakarta Project,  Apache WebApp Module,  and Apache
  dnl Software Foundation  must not be used to endorse or promote  products
  dnl derived  from this  software  without  prior  written  permission. For
  dnl written permission, please contact [EMAIL PROTECTED].
  dnl
  dnl  5. Products derived from this software may not be called Apache nor may
  dnl Apache appear in their names without prior written permission of the
  dnl Apache Software Foundation.
  dnl
  dnl  THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESSED OR IMPLIED WARRANTIES
  dnl  INCLUDING, BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES OF MERCHANTABILITY
  dnl  AND FITNESS FOR  A PARTICULAR PURPOSE  ARE DISCLAIMED.  IN NO EVENT SHALL
  dnl  THE APACHE  SOFTWARE  FOUNDATION OR  ITS CONTRIBUTORS  BE LIABLE  FOR ANY
  dnl  DIRECT,  INDIRECT,   INCIDENTAL,  SPECIAL,  EXEMPLARY,  OR  CONSEQUENTIAL
  dnl  DAMAGES (INCLUDING,  BUT NOT LIMITED TO,  PROCUREMENT OF SUBSTITUTE GOODS
  dnl  OR SERVICES;  LOSS OF USE,  DATA,  OR PROFITS;  OR BUSINESS INTERRUPTION)
  dnl  HOWEVER CAUSED AND  ON ANY  THEORY  OF  LIABILITY,  WHETHER IN  CONTRACT,
  dnl  STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  dnl  ANY  WAY  OUT OF  THE  USE OF  THIS  SOFTWARE,  EVEN  IF  ADVISED  OF THE
  dnl  POSSIBILITY OF SUCH DAMAGE.
  dnl
  dnl  =
  dnl
  dnl  This software  consists of voluntary  contributions made  by many indivi-
  dnl  duals on behalf of the  Apache Software Foundation.  For more information
  dnl  on the Apache Software Foundation, please see http://www.apache.org/.
  dnl
  dnl  =
  
  dnl --
  dnl Author Pier Fumagalli [EMAIL PROTECTED]
  dnl Version $Id: wa_util.m4,v 1.1 2002/05/01 00:31:07 pier Exp $
  dnl --
  
  dnl --
  dnl WA_ERROR
  dnl   Dump an error message and make sure we actually exit.
  dnl   $1 = Message to dump for error.
  dnl --
  AC_DEFUN(
[WA_ERROR],
[
  AC_MSG_RESULT([error])
  AC_MSG_ERROR([$1])
  exit 1
])
  
  dnl --
  dnl WA_VARIABLE
  dnl   Initialize a substituted (global) variable with a zero-length string.
  dnl   $1 = The environment variable name.
  dnl --
  AC_DEFUN(
[WA_VARIABLE],
[
  $1=
  AC_SUBST([$1])
])
  
  dnl --
  dnl WA_PATH_DIR
  dnl   Resolve the FULL path name of a directory.
  dnl   $1 = The variable where the full path name will be stored.
  dnl   $2 = The path to resolve.
  dnl   $3 = The description of what we're trying to locate.
  dnl --
  AC_DEFUN(
[WA_PATH_DIR],
[
  AC_MSG_CHECKING([for $3