add macro to support for haproxy with weights