A homogenization result for a family of oscillating integral energies
$u_{\epsilon}\mapsto\int_{\Omega} f(x,\tfrac{x}{\epsilon},u_{\epsilon}(x))\,dx,\quad \epsilon\to 0^+$
is presented, where the fields $u_{\epsilon}$ are subjected to first order linear differential constraints depending on the space variable $x$.
The work is based on the theory of $\mathscr{A}$-quasiconvexity with variable coefficients and on two-scale convergence techniques, and generalizes the previously obtained results in the case in which the differential constraints are imposed by means of a linear first order differential operator with constant coefficients. The identification of the relaxed energy in the framework of $\mathscr{A}$-quasiconvexity with variable coefficients is also recovered as a corollary of the homogenization result.