+ ac_cv_lib_glut_glutGameModeString="yes"
+fi
+
+if test "x$ac_cv_lib_glut_glutGetModifiers" = "xno"; then
+ echo
+ echo "Unable to find the necessary OpenGL or GLUT libraries."
+ echo "See config.log for automated test details and results ..."
+ exit 1
+fi
+
+if test "x$ac_cv_lib_glut_glutGameModeString" = "xno"; then
+ echo
+ echo "Your version of glut doesn't support game mode."
+ echo "You need to fetch and install the latest version of glut from:"
+ echo
+ echo " http://reality.sgi.com/opengl/glut3/glut3.html"
+ exit 1
+fi
+
+opengl_LIBS="$LIBS"
+LIBS="$base_LIBS"
+
+AC_SUBST(base_LIBS)
+AC_SUBST(opengl_LIBS)
+
+AM_CONDITIONAL(HAVE_XWINDOWS, test "x$ac_cv_lib_X11_XCreateWindow" = "xyes" )
+
+dnl Check if Generic Polygon Clipping library is installed
+dnl (from http://www.cs.man.ac.uk/aig/staff/alan/software/)
+AC_CHECK_HEADERS( gpc.h )
+if test "x$ac_cv_header_gpc_h" != "xyes"; then
+ echo
+ echo "You need to have the GPC library installed on your system to build"
+ echo "some of the scenery generation tools, otherwise you won't be able."
+ echo "to create scenery."
+ echo
+ echo "Please see README.gpc for more details."
+ echo
+ echo "(pausing 2 seconds)"
+ sleep 2
+ echo
+fi
+
+dnl Check if Geographic Foundation Classes library is installed
+dnl (from http://www.geog.psu.edu/~qian/gfc/index.html)
+AC_CHECK_HEADERS( gfc/gdbf.h )
+if test "x$ac_cv_header_gfc_gdbf_h" != "xyes"; then
+ echo
+ echo "You need to have the GFC library installed on your system to build"
+ echo "some of the scenery generation tools, otherwise, they may fail."
+ echo
+ echo "You can get the original library from:"
+ echo
+ echo " http://www.geog.psu.edu/~qian/gfc/index.html"
+ echo
+ echo "However, I recommend you grab a copy with a couple modifications I"
+ echo "have made which should eliminate several gfc build problems:"
+ echo
+ echo " ftp://ftp.flightgear.org/pub/fgfs/Source/gfc-0.8.8.1a.tar.gz"
+ echo
+ echo "(pausing 5 seconds)"
+ sleep 5
+ echo