- 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
+ LIBS="$LIBS -lglu32 -lopengl32"
+ LIBS="$LIBS -luser32 -lgdi32 -lwinmm"
+
+ dnl add -lwsock32 for mingwin
+ case "${host}" in
+ *-*-mingw32*)
+ base_LIBS="$base_LIBS -lws2_32"
+ ;;
+ esac
+
+ echo "Will link apps with $LIBS"
+ ;;
+
+*-apple-darwin*)
+ dnl Mac OS X
+
+ LIBS="$LIBS -framework OpenGL -framework Carbon -lobjc"
+ ;;
+
+*)
+ dnl X-Windows based machines
+
+ AC_SEARCH_LIBS(XCreateWindow, X11)
+ AC_SEARCH_LIBS(XShmCreateImage, Xext)
+ AC_SEARCH_LIBS(XGetExtensionVersion, Xi)
+ AC_SEARCH_LIBS(IceOpenConnection, ICE)
+ AC_SEARCH_LIBS(SmcOpenConnection, SM)
+ AC_SEARCH_LIBS(XtMalloc, Xt)
+ AC_SEARCH_LIBS(XmuLookupStandardColormap, Xmu)
+
+ AC_SEARCH_LIBS(glNewList, [ GL GLcore MesaGL ])
+ if test "x$ac_cv_search_glNewList" = "x-lGLcore"; then
+ dnl if GLcore found, then also check for GL
+ AC_SEARCH_LIBS(glXCreateContext, GL)