  In this paper, we consider the following quasilinear elliptic problem with
potential
  $$(P)
  \begin{cases}
  -\mbox{div}(\phi(x,|\nabla u|)\nabla u)+ V(x)|u|^{q(x)-2}u= f(x,u) & \ \
\mbox{ in }\Omega,
  u=0 & \ \ \mbox{ on } \partial\Omega,
  \end{cases}$$
  where $\Omega$ is a smooth bounded domain in $\mathbb{R}^{N}$ ($N\geq 2$),
$V$ is a given function in a generalized Lebesgue space $L^{s(x)}(\Omega)$, and
$f(x,u)$ is a Carath\'eodory function satisfying suitable growth conditions.
Using variational arguments, we study the existence of weak solutions for $(P)$
in the framework of Musielak-Sobolev spaces. The main difficulty here is that
the nonlinearity $f(x,u)$ considered does not satisfy the well-known
Ambrosetti-Rabinowitz condition.
