well, actually you can do it by rotating about 1 arbitrary axis.
Say you have A, which is your current vector, and B, which is your goal vector. Your intention is to find out how to make vector A coincide with vector B.
First handle the 2 easy cases. Take A dot B. If the result is 1, they are the same vector. Nothing more to do. If the result is -1, they are 180 degrees apart, so you can rotate A 180 about ANY axis and you have the problem solve.
The third case is the trick. First you want to find an axis that is perpendicular to both vectors. You can then use this vector to rotate A into position with B (after finding the proper angle).
To find this axis of rotation, take the cross product of A and B, normalize the result, and you have your axis of rotation, which we will denote as the vector (Rx,Ry,Rz). Next you need to find the angle of rotation. Take the equation:
A dot B = cos(angle)*length(a)*length(b)
with manipulation, you can turn this into:
angle = arccos((a dot B)/(length(a)*length(b)))
now, you can use glRotatef(angle, Rx, Ry, Rz)
be warned, you may need to use -angle or -Rx, -Ry, -Rz. But this is pretty much what you want
Hope this helps