configure/m4: use PKG_CHECK_MODULES, update configure.ac