Handle static GLEW.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
dnl AX_CHECK_LIB_USING_HEADER(lib, function, header, [action-if-found], [action-if-not-found])
|
dnl AX_CHECK_LIB_USING_HEADER(lib, function, header, [action-if-found], [action-if-not-found], [other-libraries])
|
||||||
dnl As AC_CHECK_LIB except "function" must be a fully valid function call and "header" the header file in which that function is defined. The benefit is that this can find functions whose symbols have been decorated, e.g. a lot of MinGW stuff.
|
dnl As AC_CHECK_LIB except "function" must be a fully valid function call and "header" the header file in which that function is defined. The benefit is that this can find functions whose symbols have been decorated, e.g. a lot of MinGW stuff.
|
||||||
|
|
||||||
AC_DEFUN([AX_CHECK_LIB_USING_HEADER],
|
AC_DEFUN([AX_CHECK_LIB_USING_HEADER],
|
||||||
@@ -10,7 +10,7 @@ dnl # On Windows OpenGL functions' library symbols don't match their function na
|
|||||||
AC_LANG_PUSH(C)
|
AC_LANG_PUSH(C)
|
||||||
|
|
||||||
LIBS_SAVE=$LIBS
|
LIBS_SAVE=$LIBS
|
||||||
LIBS="$LIBS -l$1"
|
LIBS="$LIBS -l$1 $6"
|
||||||
AC_LINK_IFELSE(
|
AC_LINK_IFELSE(
|
||||||
[AC_LANG_PROGRAM([#include <$3>], [$2])],
|
[AC_LANG_PROGRAM([#include <$3>], [$2])],
|
||||||
[AC_MSG_RESULT(yes)
|
[AC_MSG_RESULT(yes)
|
||||||
|
|||||||
@@ -31,7 +31,12 @@ AC_DEFUN([SM_OPENGL],
|
|||||||
AX_CHECK_LIB_USING_HEADER(GLEW, glewInit(), GL/glew.h, [GLEW_LIBS="$LIBS -lGLEW"])
|
AX_CHECK_LIB_USING_HEADER(GLEW, glewInit(), GL/glew.h, [GLEW_LIBS="$LIBS -lGLEW"])
|
||||||
|
|
||||||
if test "$GLEW_LIBS" = ""; then
|
if test "$GLEW_LIBS" = ""; then
|
||||||
AX_CHECK_LIB_USING_HEADER(glew32, glewInit(), GL/glew.h, [GLEW_LIBS="$LIBS -lglew32"])
|
AX_CHECK_LIB_USING_HEADER(glew32, glewInit(), GL/glew.h, [GLEW_LIBS="$LIBS -lglew32"], , [$GL_LIBS])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$GLEW_LIBS" = ""; then
|
||||||
|
AC_DEFINE([GLEW_STATIC], [], [Tell GLEW it is a static library.])
|
||||||
|
AX_CHECK_LIB_USING_HEADER(glew32, glewInit(), GL/glew.h, [GLEW_LIBS="$LIBS -lglew32"], , [$GL_LIBS])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$GLEW_LIBS" = ""; then
|
if test "$GLEW_LIBS" = ""; then
|
||||||
|
|||||||
Reference in New Issue
Block a user