[PATCH xdm] greeter: link against -lXrender if xft is enabled

Julien Cristau jcristau at debian.org
Sat Oct 22 08:23:40 PDT 2011


XmuCvtStringToXftColor uses XRenderParseColor, so require xrender for
the xft option, and link against it.

Signed-off-by: Julien Cristau <jcristau at debian.org>
---
 configure.ac    |    4 ++--
 greeter/Login.c |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index fcb37f8..d20ae28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,10 +345,10 @@ AC_ARG_WITH(xft,
 	AS_HELP_STRING([--with-xft],
 			[Use Xft to draw text (default is YES if installed)]),
 	[USE_XFT="$withval"],
-	PKG_CHECK_EXISTS(xft, [USE_XFT="yes"], [USE_XFT="no"]))
+	PKG_CHECK_EXISTS(xft xrender, [USE_XFT="yes"], [USE_XFT="no"]))
 
 if test "x$USE_XFT" = "xyes" ; then
-	PKG_CHECK_MODULES(XFT, xft)
+	PKG_CHECK_MODULES(XFT, xft xrender)
 	GREETER_CFLAGS="$GREETER_CFLAGS $XFT_CFLAGS"
 	GREETER_LIBS="$GREETER_LIBS $XFT_LIBS"
 	AC_DEFINE([USE_XFT], 1,
diff --git a/greeter/Login.c b/greeter/Login.c
index 99a3932..d899376 100644
--- a/greeter/Login.c
+++ b/greeter/Login.c
@@ -86,6 +86,10 @@ from The Open Group.
 # include <X11/extensions/Xinerama.h>
 #endif
 
+#ifdef USE_XFT
+# include <X11/extensions/Xrender.h>
+#endif
+
 #ifndef DEBUG
 # define XDM_ASSERT(a)	/* do nothing */
 #else
-- 
1.7.6.3



More information about the xorg-devel mailing list