Self-gravitating warps in disc galaxies