git-svn-id: https://scorched3d.svn.sourceforge.net/svnroot/scorched3d/trunk/scorched...
[scorched3d/parasti.git] / configure-gl.m4
blob2ae59d81e90615448688d257b97f3f8dc89fccd4
1 dnl Checks for OpenGL
2 AC_ARG_ENABLE(opengltest, 
3         [  --disable-opengltest    Do not try to compile and run a test OpenGL program],
4                     , enable_opengltest=yes)
5 AC_MSG_CHECKING(for OpenGL support)
6 have_opengl=yes
7 if test "x$enable_opengltest" = "xyes" ; then
8         AC_TRY_COMPILE([
9                 #include <GL/gl.h>
10                 #include <GL/glu.h>
11                 ],[
12                 ],[
13                 have_opengl=yes
14                 ],[
15                 have_opengl=no
16         ])
19 AC_MSG_RESULT($have_opengl)
20 if test x$have_opengl != xyes; then
21     AC_MSG_ERROR([*** Can't find the OpenGL library Try: http://www.opengl.org])
24 if test `uname -s` == FreeBSD; then 
25     GL_LIBS="-lGL -lGLU"
26 else 
27     if test `uname -s` == Darwin; then 
28         GL_LIBS="-framework OpenGL"
29     else
30         GL_LIBS="-lGL -lGLU -lpthread" 
31     fi
32 fi 
34 AC_SUBST(GL_LIBS)