Let $M$ be an $n$-dimensional smooth manifold, $L:\Bbb R\times \mathrm{T}M\to\Bbb R$ some smooth function, then for any curve $\gamma:[a,b]\to M$, we define the functional $$J[\gamma]=\int_a^b L(t,\gamma(t),\dot{\gamma}(t))\,\mathrm{d}t.$$ Now, I know that $C^\infty([a,b],M)$ doesn't have any natural vector space structure for general $M\ne\Bbb R^n$, but nonetheless we can give it a subspace topology from $C^\infty([a,b],TM)$ with the topology of point-wise convergence, and the Euler-Lagrange equation $$\frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial L}{\partial \dot x^i}(t,\gamma(t),\dot\gamma(t)) - \frac{\partial L}{\partial x^i}(t,\gamma(t),\dot\gamma(t))=0\ \ \forall\ 1\le i\le n$$ still makes sense and is independent of the choice of coordinates on $M$. Do these equations then give a necessary condition for $\gamma$ being a local extrema with respect to the functional $J$?
Also, I read somewhere that the space of curves on some Riemannian manifold can be given the structure of an infinite dimensional Riemannian manifold. Is this true, and if so, how is this done?