Mesa (staging/18.2): autotools: use correct gl.pc LIBS when using glvnd
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 9 00:50:37 UTC 2018
Module: Mesa
Branch: staging/18.2
Commit: 6ae0a639ec3a000bc4106152e288f419386d75cb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ae0a639ec3a000bc4106152e288f419386d75cb
Author: Emil Velikov <emil.velikov at collabora.com>
Date: Fri Feb 23 19:32:08 2018 +0000
autotools: use correct gl.pc LIBS when using glvnd
This is more of a hack, since glvnd itself should be providing the file.
Until that happens, ensure the libs is correctly set to -lGL
CC: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
(cherry picked from commit 315c46cfdc3dbd4d51b74ab26df693725e947724)
---
configure.ac | 9 +++++++++
src/mesa/gl.pc.in | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index ff4828c5b5..864dcae8e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1533,6 +1533,15 @@ fi
AC_SUBST([GL_LIB])
AC_SUBST([OSMESA_LIB])
+dnl HACK when building glx + glvnd we ship gl.pc, despite that glvnd should do it
+dnl Thus we need to use GL as a DSO name.
+if test "x$enable_libglvnd" = xyes -a "x$enable_glx" != xno; then
+ GL_PKGCONF_LIB="GL"
+else
+ GL_PKGCONF_LIB="$GL_LIB"
+fi
+AC_SUBST([GL_PKGCONF_LIB])
+
# Check for libdrm
PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED],
[have_libdrm=yes], [have_libdrm=no])
diff --git a/src/mesa/gl.pc.in b/src/mesa/gl.pc.in
index 181724b97b..680f742776 100644
--- a/src/mesa/gl.pc.in
+++ b/src/mesa/gl.pc.in
@@ -7,7 +7,7 @@ Name: gl
Description: Mesa OpenGL library
Requires.private: @GL_PC_REQ_PRIV@
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -l at GL_LIB@
+Libs: -L${libdir} -l at GL_PKGCONF_LIB@
Libs.private: @GL_PC_LIB_PRIV@
Cflags: -I${includedir} @GL_PC_CFLAGS@
glx_tls: @GLX_TLS@
More information about the mesa-commit
mailing list