[Spice-devel] [PATCH] Explicitly depend on various X libraries, and -pthread

Søren Sandmann Pedersen sandmann at daimi.au.dk
Wed Mar 10 06:34:32 PST 2010


From: Søren Sandmann Pedersen <ssp at redhat.com>

In Fedora 13, the linker doesn't pull in DT_NEEDED libraries anymore,
so we have to list the things that we depend on explicitly.

This affects several X extension libraries, and also the pthread
library.
---
 client/x11/Makefile.am |    6 +++++-
 configure.ac           |    7 ++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/client/x11/Makefile.am b/client/x11/Makefile.am
index d703101..4b3f60d 100644
--- a/client/x11/Makefile.am
+++ b/client/x11/Makefile.am
@@ -22,8 +22,10 @@ INCLUDES = \
 	$(CELT051_CFLAGS)				\
 	$(SSL_CFLAGS)					\
 	$(XRANDR_CFLAGS)				\
+	$(MISC_X_CFLAGS)				\
 	$(CEGUI_CFLAGS)					\
 	$(WARN_CFLAGS)                                  \
+	$(SPICE_NONPKGCONFIG_CFLAGS)			\
 	$(NULL)
 
 
@@ -152,7 +154,8 @@ spicec_LDFLAGS = \
 	$(LOG4CPP_LIBS)					\
 	$(CELT051_LIBS)					\
 	$(SSL_LIBS)					\
-	$(CEGUI_LIBS)
+	$(CEGUI_LIBS)					\
+	$(SPICE_NONPKGCONFIG_LIBS)
 
 spicec_LDADD =						\
 	$(PIXMAN_LIBS)					\
@@ -160,6 +163,7 @@ spicec_LDADD =						\
 	$(ALSA_LIBS)					\
 	$(GL_LIBS)					\
 	$(XRANDR_LIBS)					\
+	$(MISC_X_LIBS)					\
 	$(CEGUI_LIBS)					\
 	-lrt
 
diff --git a/configure.ac b/configure.ac
index 8b28900..ef66a98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,7 +101,7 @@ AC_CHECK_LIB(rt, clock_gettime,
    )
 AC_SUBST(LIBRT)
 
-SPICE_NONPKGCONFIG_LIBS+=" $LIBM $LIBRT"
+SPICE_NONPKGCONFIG_LIBS+=" -pthread $LIBM $LIBRT"
 
 SPICE_REQUIRES=""
 
@@ -187,6 +187,11 @@ if test "x$have_xrandr12" = "xyes" ; then
   AC_DEFINE([HAVE_XRANDR12], [], [Define if we have XRANDR 12])
 fi
 
+PKG_CHECK_MODULES(MISC_X, x11 xext xrender)
+AC_SUBST(MISC_X_CFLAGS)
+AC_SUBST(MISC_X_LIBS)
+SPICE_REQUIRES+=" x11 xext xrender"
+
 # Add parameter for (partial) static linkage of spice client.
 # this is used to achive single binary package for all (?) distros.
 AC_ARG_ENABLE(static-linkage, 
-- 
1.7.0.1



More information about the Spice-devel mailing list