[Libva] [PATCH] fix for GL_DEPS_LIBS when there is neither gl.pc nor libGL.so
Xiang, Haihao
haihao.xiang at intel.com
Fri Aug 31 01:30:08 PDT 2012
The root cause for this issue is to link wrong libraries when build
libva-egl. the following patch can fix this issue:
---
va/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/va/Makefile.am b/va/Makefile.am
index a2a26e6..968474f 100644
--- a/va/Makefile.am
+++ b/va/Makefile.am
@@ -120,7 +120,7 @@ libva_egl_la_SOURCES =
libva_egl_la_LDFLAGS = $(LDADD)
libva_egl_la_DEPENDENCIES = $(libvacorelib) egl/libva_egl.la libva-x11.la
libva_egl_la_LIBADD = $(libvacorelib) egl/libva_egl.la libva-x11.la \
- $(GL_DEPS_LIBS) -ldl
+ $(EGL_DEPS_LIBS) -ldl
endif
if USE_WAYLAND
--
1.7.9.5
> ---
> configure.ac | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 9c282b2..eedd6fb 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -236,12 +236,19 @@ GL_DEPS_LIBS=""
> if test "$USE_X11:$enable_glx" = "yes:yes"; then
> saved_CFLAGS="$CFLAGS"
> saved_LIBS="$LIBS"
> - PKG_CHECK_MODULES([GL_DEPS], [gl], [], [GL_DEPS_LIBS="-lX11 -lGL"])
> + PKG_CHECK_MODULES([GL_DEPS], [gl], [], [_GL_DEPS_LIBS="-lX11 -lGL"])
> CFLAGS="$CFLAGS $GL_DEPS_CFLAGS"
> - LIBS="$LIBS $GL_DEPS_LIBS"
> + if test -nz "$GL_DEPS_LIBS" ; then
> + LIBS="$LIBS $GL_DEPS_LIBS"
> + else
> + LIBS="$LIBS $_GL_DEPS_LIBS"
> + fi
> AC_CHECK_HEADERS([GL/gl.h])
> AC_CHECK_HEADERS([GL/glx.h])
> AC_CHECK_LIB(GL, glXCreateContext, [USE_GLX="yes"])
> + if test "$USE_GLX" = "yes" && test -z "$GL_DEPS_LIBS"; then
> + GL_DEPS_LIBS = "$_GL_DEPS_LIBS="
> + fi
> CFLAGS="$saved_CFLAGS"
> LIBS="$saved_LIBS"
> fi
More information about the Libva
mailing list