dreid 01/07/24 03:05:36
Modified: build apr_common.m4 Log: Add the ability to remove an element as well as add one. Revision Changes Path 1.21 +26 -0 apr/build/apr_common.m4 Index: apr_common.m4 =================================================================== RCS file: /home/cvs/apr/build/apr_common.m4,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- apr_common.m4 2001/07/05 00:02:10 1.20 +++ apr_common.m4 2001/07/24 10:05:36 1.21 @@ -174,6 +174,32 @@ ])dnl dnl +dnl APR_REMOVEFROM(variable, value) +dnl +dnl Remove a value from a variable +dnl +AC_DEFUN(APR_REMOVEFROM,[ + if test "x$$1" = "x$2"; then + echo " nulling $1" + $1="" + else + apr_new_bugger="" + apr_removed=0 + for i in $$1; do + if test "x$i" != "x$2"; then + apr_new_bugger="$apr_new_bugger $i" + else + apr_removed=1 + fi + done + if test $apr_removed = "1"; then + echo " removed \"$2\" from $1" + $1=$apr_new_bugger + fi + fi +]) dnl + +dnl dnl APR_CHECK_DEFINE_FILES( symbol, header_file [header_file ...] ) dnl AC_DEFUN(APR_CHECK_DEFINE_FILES,[
