Spain is on course to hold its fourth election in four years as a deadline approaches for forming a new government without any sign of agreement.