the demonstration that states that the FT of the ACF function is the square of the DTFT of the signal
You are right, the derivation is full of typos. The first equation below Eq. $(8.39)$ should read

$$\int_{-\infty}^{\infty}x(t+\tau)e^{\color{red}{-}j\omega\tau}d\tau=X(\omega)e^{j\omega \color{red}{t}}\tag{1}$$

Substituting into $(8.39)$ gives

$$\begin{align}\mathcal{F}\big\{R(\tau)\big\}&amp;=\int_{-\infty}^{\infty}x(t)X(\omega)e^{j\omega t}dt\\&amp;=X(\omega)X(-\omega)=|X(\omega)|^2\end{align}\tag{2}$$

where the last equality is only true for real-valued $x(t)$. However, the overall result is also true for complex-valued $x(t)$ because in that case the ACF is defined differently:

$$\mathcal{F}\big\{R(\tau)\big\}=\int_{-\infty}^{\infty}x^*(t)x(t+\tau)dt\tag{3}$$