Set logging to check with maintainer mode.

This fixes part of #54.
Enable logging check if --with-log4cplus is given.