[MERGE] add Java m4 macro and detect log4j in configure

Signed-off-by: David Goulet <dgoulet@efficios.com>