Skip to content
Browse files

configure: fix check for EGL and GLESv2.

Ensure that the right libraries and includes are added for non-standard
installations of the EGL/GLESv2 stack.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
  • Loading branch information...
1 parent d97da5a commit b315964c8074764625e3f11b2cb4802e038a1daf @gbeauchesne committed Aug 10, 2012
Showing with 10 additions and 2 deletions.
  1. +6 −0 configure.in
  2. +2 −1 xbmc/visualizations/OpenGLSpectrum/Makefile.in
  3. +2 −1 xbmc/visualizations/WaveForm/Makefile.in
View
6 configure.in
@@ -792,6 +792,12 @@ if test "$use_gles" = "yes"; then
AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."])
AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.)
else
+ PKG_CHECK_MODULES([EGL], [egl], [
@theuni
theuni added a note Aug 19, 2012

I'm a bit hesitant to do this. Some (proprietary) vendors do some insane things with their pkgconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ INCLUDES="$INCLUDES $EGL_CFLAGS"
+ LIBS="$LIBS $EGL_LIBS"], [EGL_LIBS="-lEGL"])
+ PKG_CHECK_MODULES([GLES2], [glesv2], [
+ INCLUDES="$INCLUDES $GLES2_CFLAGS"
+ LIBS="$LIBS $GLES2_LIBS"], [GLES2_LIBS="-lGLESv2"])
AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library))
fi
View
3 xbmc/visualizations/OpenGLSpectrum/Makefile.in
@@ -14,7 +14,8 @@ ifeq (@USE_OPENGLES@,1)
ifeq ($(findstring osx,$(ARCH)), osx)
LDFLAGS += -framework OpenGLES
else
- LDFLAGS += -lGLESv2
+ INCLUDES += @GLES2_CFLAGS@
+ LDFLAGS += @GLES2_LIBS@
endif
else
DEFINES += -DHAS_SDL
View
3 xbmc/visualizations/WaveForm/Makefile.in
@@ -15,7 +15,8 @@ ifeq (@USE_OPENGLES@,1)
ifeq ($(findstring osx,$(ARCH)), osx)
LDFLAGS += -framework OpenGLES
else
- LDFLAGS += -lGLESv2
+ INCLUDES += @GLES2_CFLAGS@
+ LDFLAGS += @GLES2_LIBS@
endif
else
OBJS = Main.o

1 comment on commit b315964

@gbeauchesne
Owner

@theuni: the alternative to pkg-config could probably be --with-{vaapi,opengl,lib{egl,gles2}}-path=... configure option? What kind of nasty things could happen in .pc files? Or, probably overriding INCLUDES=... LIBS=... before the ./configure command could be enough to let the script thing all dependencies installed in alternative directories?

Please sign in to comment.
Something went wrong with that request. Please try again.