Internally, gluPerspective simply calls glFrustum:
void gluPerspective(float fovy, float aspect, float zNear, float zFar)
{
float ymax = zNear * tan(fovy * 2 * 3.14159f / 180.0f);//degrees to radians
float ymin = -ymax;
float xmin = ymin * aspect;
float xmax = ymax * aspect;
glFrustum(xmin, xmax, ymin, ymax, zNear, zFar);
}
If you want to construct your own perspective matrix, you can do so (using wikipedia/wolfram/etc to find the math) and give it to GL via glLoadMatrix.