The thirtieth sutta of the Dīgha Nikāya.
It gives an account of the thirty two special marks of the superman (mahāpurisalakkhanāni) which signify that their possessor will be either a world emperor (Cakkavatti) or a Buddha.
The sutta definitely states that these marks are entirely due to good deeds done in former births und can only be maintained in the present life by goodness. D.iii.142 79; the sutta is quoted in Mil. p. 405.