Ignore:
Timestamp:
Aug 2, 2011, 2:27:09 AM (8 years ago)
Author:
sam
Message:

build: fix an error causing -lopengl32 to be used on Linux; use AC_TRY_LINK
instead of AC_TRY_COMPILE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r793 r795  
    8787AC_CHECK_LIB(GL, glLoadIdentity,
    8888 [ac_cv_my_have_gl="yes"
    89   AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available)
    90   GL_LIBS="-lGL"]) # FIXME: hackish
     89  AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hackish
     90  GL_LIBS="-lGL"])
    9191AC_CHECK_HEADER(GL/gl.h,
    92  [AC_TRY_COMPILE([#include <GL/gl.h>],
     92 [LIBS_save="$LIBS"
     93  LIBS="$LIBS -lopengl32"
     94  AC_MSG_CHECKING(for glLoadIdentity in -lopengl32)
     95  AC_TRY_LINK([#include <GL/gl.h>],
    9396   [glLoadIdentity();],
    9497   [ac_cv_my_have_gl="yes"
    95     AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available)
    96     GL_LIBS="-lopengl32"])]) # FIXME: hackish
     98    AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hacky
     99    AC_MSG_RESULT("yes")
     100    GL_LIBS="-lopengl32"],
     101   [AC_MSG_RESULT("no")])
     102  LIBS="$LIBS_save"])
    97103if test "${ac_cv_my_have_gl}" = "no"; then
    98104  AC_MSG_ERROR([[No OpenGL or OpenGL ES implementation found]])
Note: See TracChangeset for help on using the changeset viewer.