Преглед на файлове

build: make build-mingw properly use the contrib libglew.

legacy
Sam Hocevar sam преди 13 години
родител
ревизия
8a1b15f487
променени са 2 файла, в които са добавени 19 реда и са изтрити 3 реда
  1. +7
    -1
      build-mingw
  2. +12
    -2
      configure.ac

+ 7
- 1
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


+ 12
- 2
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 <GL/glew.h>],
[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)


Зареждане…
Отказ
Запис