--- a/configure.ac
+++ b/configure.ac
@@ -288,7 +288,7 @@
 dnl ===========================================================================
 dnl Set GCC compiler flags
 
-if [ test "${GCC}" = "yes" ]
+if [ test "${GCC}" = "enablethisforheadache" ]
 then
   # Enable common warnings flags
   CFLAGS="${CFLAGS} -Wall"
@@ -2051,8 +2051,8 @@
   LDFLAGS="$LDFLAGS $GLUT_LIBS"
 
   AC_CHECK_HEADER(GL/glut.h,
-    AC_CHECK_LIB(glut,main,
-      [GLUT_LIBS="$GLUT_LIBS -lglut"
+    AC_CHECK_LIB(freeglut,main,
+      [GLUT_LIBS="$GLUT_LIBS -lfreeglut"
       use_glut="Yes"
       AC_DEFINE_UNQUOTED(HAVE_GLUT,1,[Define if you have the GLUT library])],
       use_glut="No (missing libglut)"
