  We present technical details of the evaluation of the elastic pi-pi
scattering amplitude to two loops in chiral perturbation theory. In particular,
we elaborate on the renormalization procedure at the two-loop order and on the
evaluation of the relevant Feynman diagrams that can all be expressed in terms
of elementary functions. For the sake of clarity, we discuss these matters both
in the N-component $\phi^4$ theory (in its symmetric phase) and in chiral
perturbation theory. Estimates for the relevant low-energy constants of
$O(p^6)$ are presented. Threshold parameters and phase shifts are then
calculated for two sets of $O(p^4)$ coupling constants and compared with
experiment. We comment on the extraction of threshold parameters from phase
shift data.
