Showing $\int_{0}^{\infty} \frac{\sin{x}}{x} \ dx = \frac{\pi}{2}$ using complex integration

Recently I had to use the fact that the Dirichlet integral evaluates as

$$\int_{0}^{\infty} \frac{\sin{x}}{x} \ dx = \frac{\pi}{2}$$ a couple of times.

There already is a question that specifically ask for methods to show this result $\textbf{not}$ using complex integration. In this question I am interested in seeing the derivation via contour integration. ( I am aware of the wikipedia entry, but am looking for more detail )

-

We need to use $f(z) = (e^{iz} - 1)/z$ because it has a removable singularity at $z = 0$. Consider a contour $C = [-R, R] \cup C_R$ for $R > 0$. Then $$I \equiv \int_{-R}^R f(z)dz + \int_{C_R} f(z)dz = 0$$ by Cauchy Theorem, i.e., $$\int_{-R}^R f(z)dz = \int_{C_R} \frac{1}{z}dz - \int_{C_R} \frac{e^{iz}}{z}dz$$ but $$\int_{C_R} \frac{1}{z}dz = \pi i$$ and we can show that the other integral goes to zero as $R \to \infty$. Therefore, because $$\int_{-R}^R \frac{\sin x}{x}dx = \operatorname{Im}I,$$ we see that $$\int_{-\infty}^\infty \frac{\sin x}{x}dx = \pi$$ or $$\int_0^\infty \frac{\sin x}{x}dx = \frac{\pi}{2}.$$
@aziiri Note that if one puts $z = Re^{it}$ with $t \in [0, \pi]$, then $\left| \int_{C_R} e^{iz}dz/z \right| = \left| i\int_0^\pi e^{iRe^{it}} dt \right| \leq \int_0^\pi \left| e^{iR\cos t} \right| \cdot e^{-R\sin t} dt \leq \int_0^\pi e^{-R\sin t} dt \leq \pi/R$, where the last inequality follows from Jordan's Inequality. –  glebovg Jul 30 '13 at 19:47
@N3buchadnezzar $C_R$ is the upper half-circle with radius $R > 0$ traversed once in the counterclockwise direction, i.e., $C_R = \{z : z = Re^{it}, t \in [0, \pi]\}$. –  glebovg Jul 31 '13 at 16:52