diff --git a/build-mingw b/build-mingw index 873e49e1..0f5c0116 100644 --- a/build-mingw +++ b/build-mingw @@ -13,6 +13,9 @@ CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-1.2.14/include" CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-image-1.2.10/include" CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/sdl-mixer-1.2.11/include" +# Glew include path +CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/glew-1.6.0/include" + # GTK include path CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/lib/glib-2.0/include" CPPFLAGS="$CPPFLAGS -I`pwd`/contrib/gtk-2.22.1/lib/gtk-2.0/include" @@ -29,6 +32,9 @@ LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-1.2.14/lib" LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-image-1.2.10/lib" LDFLAGS="$LDFLAGS -L`pwd`/contrib/sdl-mixer-1.2.11/lib" +# Glew library path +LDFLAGS="$LDFLAGS -L`pwd`/contrib/glew-1.6.0/lib" + # GTK library path LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtk-2.22.1/lib" LDFLAGS="$LDFLAGS -L`pwd`/contrib/gtk-2.22.1/bin" @@ -45,7 +51,7 @@ GTK_LIBS="$GTK_LIBS -lgtkgl-2.0 -lopengl32 -lgdi32" GTK_LIBS="$GTK_LIBS -lgtk-win32-2.0 -lgdk-win32-2.0" GTK_LIBS="$GTK_LIBS -lglib-2.0 -lgthread-2.0 -lgobject-2.0" -LOL_LIBS="$LOL_LIBS -lSDL_image -lSDL_mixer -lSDLmain -lSDL -lopengl32" +LOL_LIBS="$LOL_LIBS -lSDL_image -lSDL_mixer -lSDLmain -lSDL -lopengl32 -lglew32" # Bootstrap, configure and make ./bootstrap diff --git a/configure.ac b/configure.ac index 4433c9d1..194393c7 100644 --- a/configure.ac +++ b/configure.ac @@ -96,9 +96,9 @@ AC_CHECK_HEADER(GL/gl.h, [glLoadIdentity();], [ac_cv_my_have_gl="yes" AC_DEFINE(HAVE_GL_2X, 1, Define to 1 if GL 2.x is available) # FIXME: hacky - AC_MSG_RESULT("yes") + AC_MSG_RESULT(yes) GL_LIBS="-lopengl32"], - [AC_MSG_RESULT("no")]) + [AC_MSG_RESULT(no)]) LIBS="$LIBS_save"]) if test "${ac_cv_my_have_gl}" = "no"; then AC_MSG_ERROR([[No OpenGL or OpenGL ES implementation found]]) @@ -107,6 +107,16 @@ fi dnl Use Glew? ac_cv_my_have_glew="no" PKG_CHECK_MODULES(GLEW, glew, [ac_cv_my_have_glew="yes"], [:]) +AC_CHECK_HEADER(GL/glew.h, + [LIBS_save="$LIBS" + LIBS="$LIBS -lglew32" + AC_MSG_CHECKING(for glewInit in -lglew32) + AC_TRY_LINK([#include ], + [glewInit();], + [ac_cv_my_have_glew="yes" + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + LIBS="$LIBS_save"]) if test "${ac_cv_my_have_glew}" != "no"; then AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available) AC_DEFINE(USE_GLEW, 1, Define to 1 to use libglew)