Ignore:
Timestamp:
Feb 20, 2011, 1:03:07 PM (9 years ago)
Author:
sam
Message:

Put the OpenGL header handling in <lolgl.h> for more convenience.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r658 r673  
    7777AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
    7878
     79# Which version of OpenGL to use?
     80ac_cv_my_have_gl="no"
     81PKG_CHECK_MODULES(GLES1, glesv1_cm,
     82 [ac_cv_my_have_gl="yes"
     83  AC_DEFINE(HAVE_GLES_1X, 1, Define to 1 if GLES 1.x is available)
     84  GL_CFLAGS="${GLES1_CFLAGS}"
     85  GL_LIBS="${GLES1_LIBS}"],
     86 [:])
     87PKG_CHECK_MODULES(GLES2, glesv2,
     88 [ac_cv_my_have_gl="yes"
     89  AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available)
     90  GL_CFLAGS="${GLES2_CFLAGS}"
     91  GL_LIBS="${GLES2_LIBS}"],
     92 [:])
     93AC_CHECK_LIB(GL, glLoadIdentity,
     94 [ac_cv_my_have_gl="yes"
     95  AC_DEFINE(HAVE_GL_1X, 1, Define to 1 if GL 1.x is available)
     96  GL_LIBS="-lGL"]) # FIXME: hackish
     97if test "${ac_cv_my_have_gl}" = "no"; then
     98  AC_MSG_ERROR([[No OpenGL or OpenGL ES implementation found]])
     99fi
     100
    79101# Use SDL? (always required)
    80102ac_cv_my_have_sdl="yes"
     
    84106  SDL_LIBS="${SDL_LIBS} `sdl-config --libs`"
    85107fi
     108SDL_CFLAGS="${SDL_CFLAGS} ${GL_CFLAGS}"
     109SDL_LIBS="${SDL_LIBS} ${GL_LIBS}"
    86110PKG_CHECK_MODULES(SDL, sdl, [:],
    87111 [SDL_LIBS="${SDL_LIBS} -lSDL"])
    88 AC_CHECK_LIB(GL, glLoadIdentity, SDL_LIBS="${SDL_LIBS} -lGL") # FIXME: hackish
    89112PKG_CHECK_MODULES(SDLMIXER, SDL_mixer, [:],
    90113 [SDLMIXER_LIBS="${SDLMIXER_LIBS} -lSDL_mixer"])
    91114PKG_CHECK_MODULES(SDLIMAGE, SDL_image, [:],
    92115 [SDLIMAGE_LIBS="${SDLIMAGE_LIBS} -lSDL_image"])
    93 save_CPPFLAGS="${CPPFLAGS}"
    94116SDL_CFLAGS="${SDL_CFLAGS} ${SDLMIXER_CFLAGS} ${SDLIMAGE_CFLAGS}"
    95117SDL_LIBS="${SDL_LIBS} ${SDLMIXER_LIBS} ${SDLIMAGE_LIBS}"
    96118
     119save_CPPFLAGS="${CPPFLAGS}"
    97120CPPFLAGS="${CPPFLAGS} ${SDL_CFLAGS}"
    98121AC_CHECK_HEADERS(SDL_mixer.h, [:], [ac_cv_my_have_sdl="no"])
Note: See TracChangeset for help on using the changeset viewer.