[Libva] [PATCH] fix for GL_DEPS_LIBS when there is neither gl.pc nor libGL.so

Zhao Halley halley.zhao at intel.com
Wed Aug 15 01:51:04 PDT 2012


---
 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
-- 
1.7.9.5



More information about the Libva mailing list