- AC_CHECK_LIB(GLU, gluLookAt)
- if test "x$ac_cv_lib_GLU_gluLookAt" = "xno" ; then
- dnl if no GLU, check for MesaGLU
- AC_CHECK_LIB(MesaGLU, gluLookAt)
- fi
-
- dnl check for glut
- AC_CHECK_LIB(glut, glutGetModifiers)
-
- dnl test for glutGameModeString, but avoid adding glut a second time into
- dnl the list of libraries
- save_LIBS="$LIBS"
- AC_CHECK_LIB(glut, glutGameModeString)
- LIBS="$save_LIBS"
-else
- dnl Win32 libs
-
- echo Win32 specific hacks...
- AC_DEFINE([WIN32], 1, [Define for Win32 platforms])
-
- dnl force a failed check since we will be building under windoze
- AM_CONDITIONAL(ENABLE_XMESA_FX, test "no" = "yes")
-
- dnl just define these to true and hope for the best
- ac_cv_lib_glut_glutGetModifiers="yes"
- ac_cv_lib_glut_glutGameModeString="yes"
-
- if test "x$with_sgi_opengl" = "xyes" ; then
- echo "Building with glut.dll, glu.dll, and opengl.dll"
- WIN32_GLUT=glut
- WIN32_GLU=glu
- WIN32_OPENGL=opengl
- else
- echo "Building with glut32.dll, glu32.dll, and opengl32.dll"
- WIN32_GLUT=glut32
- WIN32_GLU=glu32
- WIN32_OPENGL=opengl32
- fi
-
- LIBS="$LIBS -l${WIN32_GLUT} -l${WIN32_GLU} -l${WIN32_OPENGL}"
- LIBS="$LIBS -luser32 -lgdi32"
- if test "x$is_mingw" = "xyes" ; then
- EXTRA_DIRS="${EXTRA_DIRS}"
- fi
- echo "Will link apps with $LIBS"
-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