diff --git a/Graphics/TriD/OpenGLQ/openglq.pd b/Graphics/TriD/OpenGLQ/openglq.pd
index cb55ff0..83811b2 100644
--- a/Graphics/TriD/OpenGLQ/openglq.pd
+++ b/Graphics/TriD/OpenGLQ/openglq.pd
@@ -25,8 +25,13 @@ the copyright notice should be included in the file.
 EOD
 
 pp_addhdr('
+#ifdef HAVE_AGL_GLUT
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+#else
 #include <GL/gl.h>
 #include <GL/glu.h>
+#endif
 /* #include <GL/glx.h> */
 
 /* #include "../OpenGL/OpenGL.m" */
