Spain says EU must build its own military amid doubts over US support