The AIC is defined as $AIC=-2 \log(L(\hat\theta))+2p$, where $\hat\theta$ is the maximum likelihood estimator and $p$ is the dimension of the parameter space. For the estimation of $\theta$, one usually neglects the constant factor of the density. This is, the factor that does not depend on the parameters, in order to simplify the likelihood. On the other hand, this factor is very important for the calculation of the AIC, given that when comparing non-nested models this factor is not common and then the order of the corresponding AICs might be different if it is not considered.
My question is, do we need to compute $\log(L(\hat\theta))$ including all the terms of the density when comparing non-nested models?