[libwnck] xutils: Correctly link against libXrender
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck] xutils: Correctly link against libXrender
- Date: Mon, 13 Oct 2014 13:14:47 +0000 (UTC)
commit eddfee28c623fd7f4a0b6e38373798f96121e445
Author: David King <amigadave amigadave com>
Date: Mon Oct 13 13:38:24 2014 +0100
xutils: Correctly link against libXrender
If using cairo-xlib-xrender functions (and especially XRender
functions), use the libraries from the cairo-xlib-xrender pkg-config
file explicitly rather than relying on implicit linking. Avoids linker
errors regarding an undefined reference to XRenderFindStandardFormat.
https://bugzilla.gnome.org/show_bug.cgi?id=738455
configure.ac | 6 ++++++
libwnck/xutils.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5fe3b21..d0684ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,11 @@ PKG_CHECK_MODULES(XLIB, x11,
fi])
AC_SUBST(X11_PACKAGE)
+PKG_CHECK_EXISTS([cairo-xlib-xrender],
+ [AC_DEFINE_UNQUOTED([HAVE_CAIRO_XLIB_XRENDER], [1],
+ [Define if building against cairo-xlib-xrender])
+ CAIRO_XLIB_XRENDER_PACKAGE=cairo-xlib-xrender])
+
AC_MSG_CHECKING([if building with X Resource Information Extension Library])
if $PKG_CONFIG xres; then
AC_MSG_RESULT([yes])
@@ -146,6 +151,7 @@ PKG_CHECK_MODULES([LIBWNCK],[
gtk+-3.0 >= 3.4
glib-2.0 >= 2.32
gobject-2.0 >= 2.13.0
+ $CAIRO_XLIB_XRENDER_PACKAGE
$STARTUP_NOTIFICATION_PACKAGE
$XRES_PACKAGE
])
diff --git a/libwnck/xutils.c b/libwnck/xutils.c
index 53f3083..02ce741 100644
--- a/libwnck/xutils.c
+++ b/libwnck/xutils.c
@@ -24,7 +24,7 @@
#include <string.h>
#include <stdio.h>
#include <cairo-xlib.h>
-#if CAIRO_HAS_XLIB_XRENDER_SURFACE
+#if HAVE_CAIRO_XLIB_XRENDER
#include <cairo-xlib-xrender.h>
#endif
#include "screen.h"
@@ -1718,7 +1718,7 @@ _wnck_cairo_surface_get_from_pixmap (Screen *screen,
}
else
{
-#if CAIRO_HAS_XLIB_XRENDER_SURFACE
+#if HAVE_CAIRO_XLIB_XRENDER
int std;
switch (depth_ret) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]