I know $\int_{-\infty}^{\infty}\frac{\sin x}{x}dx=\pi$, but what is the definition of the integral here?
$\int_{-\infty}^{\infty}\left|\frac{\sin x}{x}\right|dx$ is not finite, therefore $\frac{\sin x}{x}$ is not Lebesgue-integrable. But what is the integral definition then?
If we define $\int_{-\infty}^{\infty}\frac{\sin x}{x}dx$ as $\lim_{T\rightarrow\infty}\int_{-T}^{T}\frac{\sin x}{x}dx$, then I know
$$\int_{-\infty}^{\infty}\frac{\sin x}{x}dx\overset{\circ}{=}\lim_{T\rightarrow\infty}\int_{-T}^{T}\frac{\sin x}{x}dx=\pi,$$
but is it true if I define it for example as:
$$\int_{-\infty}^{\infty}\frac{\sin x}{x}dx\overset{\circ}{=}\lim_{T\rightarrow\infty}\int_{-T}^{2T}\frac{\sin x}{x}dx\overset{?}{=}\pi?$$
If the last statement is true, then I would say $\frac{\sin x}{x}$ is integrable in the improper Riemann sense on $\mathbb{R}$, but otherwise I would say it is just convergent in principal value sense. The $\int_{0}^{\infty}\frac{\sin x}{x}dx$ Dirichlet-integral is another question, I know that is convergent in improper Riemann sense and it converges to $\frac{\pi}{2}$.
The integral is only defined in terms of the improper Riemann integral and not the Lebesgue integral. It is defined as
$$\int_{-\infty}^\infty\frac{\sin(x)}{x}dx\overset{\circ}{=}\lim_{T\to\infty}\int_0^T\frac{\sin(x)}{x}dx+\lim_{T\to-\infty}\int_T^0\frac{\sin(x)}{x}dx$$
provided both limits exist. However, since $\frac{\sin(x)}{x}$ is an even function this simply becomes
$$=\lim_{T\to\infty}\int_0^T\frac{\sin(x)}{x}dx+\lim_{T\to\infty}\int_0^T\frac{\sin(x)}{x}dx=2\lim_{T\to\infty}\int_0^T\frac{\sin(x)}{x}dx$$
As you already noted, this limit is $\frac{\pi}{2}$ which implies the original integral has value $\pi$.