Switch from the old AM_PATH_CHECK macro to pkg-config.