Potential automorphy for general linear groups