  We characterize the weights for the Stieltjes transform and the Calder\'on
operator to be bounded on the weighted variable Lebesgue spaces
$L_w^{p(\cdot)}(0,\infty)$, assuming that the exponent function $p(\cdot)$ is
log-H\"older continuous at the origin and at infinity. We obtain a single
Muckenhoupt-type condition by means of a maximal operator defined with respect
to the basis of intervals $\{ (0,b) : b>0\}$ on $(0,\infty)$. Our results
extend those in \cite{DMRO1} for the constant exponent $L^p$ spaces with
weights. We also give two applications: the first is a weighted version of
Hilbert's inequality on variable Lebesgue spaces, and the second generalizes
the results in \cite{SW} for integral operators to the variable exponent
setting.
