We construct the geometric quantization of a compact surface using a singular real polarization coming from an integrable system. Such a polarization always has singularities, which we assume to be of nondegenerate type. In particular, we compute the effect of hyperbolic singularities, which make an infinite-dimensional contribution to the quantization, thus showing that this quantization depends strongly on polarization.