configure.ac: rework wayland-protocols handling