Observability for the wave equation with variable support in the dirichlet and neumann cases