Ignore:
Timestamp:
Mar 27, 2006, 10:01:27 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Reworked the OpenGL headers and Glut features detection (what did you expect).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/configure.ac

    r694 r697  
    147147if test "${enable_gl}" != "no"; then
    148148  ac_cv_my_have_gl="no"
    149   AC_CHECK_HEADERS(GL/gl.h,
     149  AC_CHECK_HEADERS(GL/gl.h OpenGL/gl.h,
    150150   [AC_CHECK_HEADERS(GL/glut.h,
    151151     [AC_CHECK_LIB(glut, glutMainLoopEvent,
    152        [ac_cv_my_have_gl="yes"
    153         AC_DEFINE(USE_GL, 1, Define to 1 to activate the OpenGL backend driver)
    154         CACA_LIBS="${CACA_LIBS} -lGL -lglut"
    155         CACA_DRIVERS="${CACA_DRIVERS} gl"])]
     152       [ac_cv_my_have_gl="yes"])]
    156153     [AC_CHECK_LIB(glut, glutCheckLoop,
    157154       [ac_cv_my_have_gl="yes"
    158         AC_DEFINE(USE_GLUTCHECKLOOP, 1, Define to 1 to activate the glut3 glutCheckLoop call)
    159         CACA_LIBS="${CACA_LIBS} -lGL -lglut"
    160         CACA_DRIVERS="${CACA_DRIVERS} gl"])])])
    161   if test "${ac_cv_my_have_gl}" = "no" -a "${enable_gl}" = "yes"; then
     155        AC_DEFINE(HAVE_GLUTCHECKLOOP, 1, Define to 1 if you have the `glutCheckLoop' function.)])])
     156      break])
     157  if test "${ac_cv_my_have_gl}" = "yes"; then
     158    AC_DEFINE(USE_GL, 1, Define to 1 to activate the OpenGL backend driver)
     159    CACA_LIBS="${CACA_LIBS} -lGL -lglut"
     160    CACA_DRIVERS="${CACA_DRIVERS} gl"
     161  elif test "${enable_gl}" = "yes"; then
    162162    AC_MSG_ERROR([cannot find OpenGL+FreeGLUT development files])
    163163  fi
Note: See TracChangeset for help on using the changeset viewer.