define(AC_CONFIGURE_PART,[dnl
AC_MSG_RESULT()
AC_MSG_RESULT(${T_MD}$1:${T_ME})
])dnl

dnl
dnl VIPSI_ADDTO(variable, value)
dnl
dnl  Add value to variable
dnl
AC_DEFUN(VIPSI_ADDTO,[
  if test "x$$1" = "x"; then
    $1="$2"
  else
    vipsi_addto_bugger="$2"
    for i in $vipsi_addto_bugger; do
      vipsi_addto_duplicate="0"
      for j in $$1; do
        if test "x$i" = "x$j"; then
          vipsi_addto_duplicate="1"
          break
        fi
      done
      if test $vipsi_addto_duplicate = "0"; then
        $1="$$1 $i"
      fi
    done
  fi
])dnl

dnl
dnl VIPSI_REMOVEFROM(variable, value)
dnl
dnl Remove a value from a variable
dnl
AC_DEFUN(VIPSI_REMOVEFROM,[
  if test "x$$1" = "x$2"; then
    $1=""
  else
    vipsi_new_bugger=""
    vipsi_removed=0
    for i in $$1; do
      if test "x$i" != "x$2"; then
        vipsi_new_bugger="$vipsi_new_bugger $i"
      else
        vipsi_removed=1
      fi
    done
    if test $vipsi_removed = "1"; then
      $1=$vipsi_new_bugger
    fi
  fi
]) dnl
