Avoid useless bloat and compile only the extensions you need.

Extensions that are rarely used, should be compiled as shared modules and loaded by the few scripts requiring them.

--disable-all is your friend.