Singularly perturbed elliptic problems with nonautonomous asymptotically linear nonlinearities