How can I apply texture to a sphere?

How can I apply texture to a sphere?

You can just give texture coordinates the usual way or let OpenGL do it with glTexGen.