Generalized pupil function of a compound X-ray refractive lens