For improving portabilty, increasing the number of supported platforms and at the same time reducing greatly the amount for code written for the configure script, I suggest to abandon the functions written for detecting GL, GLU and GLUT in favor of the autoconf GL macros.
Here there are some references:
http://www.gnu.org/software/autoconf-archive/ax_check_gl.html
http://www.gnu.org/software/autoconf-archive/ax_check_glu.html
http://www.gnu.org/software/autoconf-archive/ax_check_glut.html
Using AX_CHECK_GL/GLU/GLUT macro has also the advantage to detect different implementations of openGL that typically provides different include files (like OpenGL/GL.h) and different libraries at linking (like -lopengl32 on Windows platforms).