tools: use AM_CPPFLAGS, and wrap its lines