[vino] Fix underlinking with libX11 and libz



commit 008deb23cf4de6c7d8b9e1ebb78f638938aa5e84
Author: David King <amigadave amigadave com>
Date:   Tue Mar 8 17:09:23 2011 +0100

    Fix underlinking with libX11 and libz
    
    AB_SUBST a variable with the zlib linker command line and add it to
    LDADD for vino-server. Remove the weird check to see if Pango provided
    '-lX11' in the linker command line, and use AC_PATH_XTRA always. Fixes
    bug 644192.

 Makefile.am  |    2 +-
 configure.ac |   26 ++++++++------------------
 2 files changed, 9 insertions(+), 19 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 4dafc0f..8504524 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -111,7 +111,7 @@ vino_server_LDADD = \
 	$(VINO_SERVER_LIBS) \
 	$(GCRYPT_LIBS) \
 	$(JPEG_LIBS) \
-	$(X_LIBS) $(XTEST_LIBS) $(XSHM_LIBS) $(XDAMAGE_LIBS)
+	$(X_LIBS) $(XTEST_LIBS) $(XSHM_LIBS) $(XDAMAGE_LIBS) $(ZLIB_LIBS)
 
 if VINO_ENABLE_HTTP_SERVER
 VINO_HTTP_sources = \
diff --git a/configure.ac b/configure.ac
index a464274..b3da1a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,23 +138,12 @@ AS_IF([test "x$have_gnome_keyring" != "xno"],
     AS_IF([test "x$with_gnome_keyring" = "xyes"],
     [AC_MSG_ERROR([gnome-keyring support requested but not found])])])
 
-# If Pango included the shared library dependencies from X11 in
-# the pkg-config output, then we use that (to avoid duplicates).
-# but if they were omitted to avoid binary compatibility problems
-# then we need to repeat the checks.
-PKG_CHECK_EXISTS([pangoxft],
-  [PANGO_PACKAGES="pangox pangoxft"],
-  [PANGO_PACKAGES="pangox"])
-
-AS_CASE([`$PKG_CONFIG --libs $PANGO_PACKAGES`],
-  [*-lX11*], [pango_omitted_x_deps=no],
-  [pango_omitted_x_deps=yes])
-
-AS_IF([test "x$pango_omitted_x_deps" = "xyes"],
-  [AC_PATH_XTRA
-    AS_IF([test "x$no_x" = "xyes"],
-      [AC_MSG_ERROR([X development libraries not found])],
-      [AC_SUBST([X_LIBS], [$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS])])])
+# Check for X11
+AC_PATH_XTRA
+
+AS_IF([test "x$no_x" = "xyes"],
+  [AC_MSG_ERROR([X development libraries not found])],
+  [AC_SUBST([X_LIBS], ["$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"])])
 
 # Check for gnutls
 GNUTLS_DEPS="gnutls >= 1.0.0"
@@ -229,7 +218,8 @@ AS_IF([test "x$with_zlib" != "xno"],
   [have_zlib=no])
 
 AS_IF([test "x$have_zlib" = "xyes"],
-  [AC_DEFINE([VINO_HAVE_ZLIB], [], [Build with zlib support])],
+  [AC_DEFINE([VINO_HAVE_ZLIB], [], [Build with zlib support])
+    AC_SUBST([ZLIB_LIBS], [-lz])],
   [AS_IF([test "x$with_zlib" = "xyes"],
     [AC_MSG_ERROR([zlib support requested but not found])])])
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]