[vino] Only use convenience libraries for smclient



commit e6a58ba0b878e6852608f22d454ad6f3766d5fda
Author: David King <amigadave amigadave com>
Date:   Wed Mar 2 18:32:21 2011 +0100

    Only use convenience libraries for smclient
    
    Cut down linking complexity by only using libtool convenience libraries
    for eggsmclient.

 .gitignore   |   10 +-------
 Makefile.am  |   75 +++++++++++++++++-----------------------------------------
 configure.ac |    3 +-
 3 files changed, 24 insertions(+), 64 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5effe63..c7c642e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,11 +27,7 @@ Makefile.in
 /intltool-extract.in
 /intltool-merge.in
 /intltool-update.in
-/libeggdesktopfile.la
 /libeggsmclient.la
-/libifaddrs.la
-/libminiupnp.la
-/libvncserver.la
 /libtool
 /mkinstalldirs
 /m4/
@@ -60,21 +56,17 @@ Makefile.in
 /server/vino-server.desktop.in
 /server/org.freedesktop.Telepathy.Client.Vino.service
 /server/libvncserver/*.o
-/server/libvncserver/*.lo
 /server/libvncserver/.deps
 /server/libvncserver/.dirstamp
-/server/libvncserver/.libs
 /server/libvncserver/ifaddr/.deps
 /server/libvncserver/ifaddr/.dirstamp
 /server/miniupnp/*.o
-/server/miniupnp/*.lo
 /server/miniupnp/.deps
 /server/miniupnp/.dirstamp
-/server/miniupnp/.libs
 /server/smclient/*.lo
 /server/smclient/.deps
-/server/smclient/.dirstamp
 /server/smclient/.libs
+/server/smclient/.dirstamp
 /stamp-h1
 /tools/*.o
 /tools/.deps
diff --git a/Makefile.am b/Makefile.am
index b26f5a4..f138915 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,51 +3,31 @@ SUBDIRS = po
 
 DISTCHECK_CONFIGURE_FLAGS = --with-avahi --with-libnotify --with-gnome-keyring --with-network-manager --with-telepathy --with-gnutls --with-gcrypt --with-zlib --with-jpeg --enable-debug --enable-http-server
 
-smclient_platform_defines = -DEGG_SM_CLIENT_BACKEND_XSMP
-smclient_cppflags = \
+noinst_LTLIBRARIES = \
+	libeggsmclient.la
+
+libeggsmclient_la_CPPFLAGS = \
 	-DG_LOG_DOMAIN=\""EggSMClient"\" \
+	-DEGG_SM_CLIENT_BACKEND_XSMP \
 	$(smclient_platform_defines) \
 	$(EGG_SMCLIENT_CFLAGS) \
 	-I$(top_builddir)
-smclient_platform_libs = libeggdesktopfile.la -lSM -lICE
-smclient_platform_sources = server/smclient/eggsmclient-xsmp.c
-
-if VINO_HAVE_SELF_IFADDRS
-ifaddrs_ltlibraries = libifaddrs.la
-endif
-noinst_LTLIBRARIES = \
-	libeggsmclient.la \
-	libeggdesktopfile.la \
-	libminiupnp.la \
-	libvncserver.la \
-	$(ifaddrs_ltlibraries)
-
-libeggsmclient_la_CPPFLAGS = \
-	$(smclient_cppflags)
 
 libeggsmclient_la_LIBADD = \
 	$(EGG_SMCLIENT_LIBS) \
-	$(smclient_platform_libs)
+	-lSM -lICE
 
 libeggsmclient_la_SOURCES = \
 	server/smclient/eggsmclient.c \
 	server/smclient/eggsmclient.h \
 	server/smclient/eggsmclient-private.h \
-	$(smclient_platform_sources)
-
-libeggdesktopfile_la_CPPFLAGS = \
-	$(smclient_cppflags)
-
-libeggdesktopfile_la_LIBADD = \
-	$(EGG_LIBS)
-
-libeggdesktopfile_la_SOURCES = \
+	server/smclient/eggsmclient-xsmp.c \
 	server/smclient/eggdesktopfile.c \
 	server/smclient/eggdesktopfile.h
 
-libminiupnp_la_CPPFLAGS = -DNDEBUG
+VINO_MINIUPNP_cppflags = -DNDEBUG
 
-libminiupnp_la_SOURCES = \
+VINO_MINIUPNP_sources = \
 	server/miniupnp/bsdqueue.h \
 	server/miniupnp/codelength.h \
 	server/miniupnp/declspec.h \
@@ -68,9 +48,11 @@ libminiupnp_la_SOURCES = \
 	server/miniupnp/upnpreplyparse.c \
 	server/miniupnp/upnpreplyparse.h
 
-libifaddrs_la_SOURCES = \
+if VINO_HAVE_SELF_IFADDRS
+VINO_IFADDRS_sources = \
 	server/libvncserver/ifaddr/getifaddrs.c \
 	server/libvncserver/ifaddr/ifaddrs.h
+endif
 
 rfb_headers = \
 	server/libvncserver/rfb/rfb.h \
@@ -78,13 +60,7 @@ rfb_headers = \
 	server/libvncserver/rfb/rfbproto.h \
 	server/libvncserver/rfb/keysym.h
 
-libvncserver_la_CPPFLAGS = \
-	$(WARN_CFLAGS) \
-	$(GNUTLS_CFLAGS) \
-	$(GCRYPT_CFLAGS) \
-	-I$(top_builddir)
-
-libvncserver_la_SOURCES = \
+VINO_LIBVNCSERVER_sources = \
 	server/libvncserver/auth.c \
 	server/libvncserver/corre.c \
 	server/libvncserver/cursor.c \
@@ -110,16 +86,6 @@ libvncserver_la_SOURCES = \
 	server/libvncserver/zrletypes.h \
 	$(rfb_headers)
 
-if VINO_HAVE_SELF_IFADDRS
-SELF_IFADDRS_LIBS = server/libvncserver/ifaddr/libifaddrs.la
-endif
-
-libvncserver_la_LIBADD = \
-	$(GNUTLS_LIBS) \
-	$(GCRYPT_LIBS) \
-	$(JPEG_LIBS) \
-	$(SELF_IFADDRS_LIBS)
-
 vino_server_CPPFLAGS = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/common \
@@ -129,6 +95,7 @@ vino_server_CPPFLAGS = \
 	-I$(top_builddir) \
 	-I$(top_builddir)/server \
 	$(VINO_SERVER_CFLAGS) \
+	$(VINO_MINIUPNP_cppflags) \
 	$(GCRYPT_CFLAGS) \
 	$(WARN_CFLAGS) \
 	$(DISABLE_DEPRECATED) \
@@ -140,21 +107,20 @@ vino_server_CPPFLAGS = \
 libexec_PROGRAMS = vino-server
 
 vino_server_LDADD = \
-	libvncserver.la \
-	libminiupnp.la \
 	libeggsmclient.la \
 	$(VINO_SERVER_LIBS) \
 	$(GCRYPT_LIBS) \
+	$(JPEG_LIBS) \
 	$(X_LIBS) $(XTEST_LIBS) $(XSHM_LIBS) $(XDAMAGE_LIBS)
 
 if VINO_ENABLE_HTTP_SERVER
-VINO_HTTP_SRC = \
+VINO_HTTP_sources = \
 	server/vino-http.c \
 	server/vino-http.h
 endif
 
 if VINO_HAVE_TELEPATHY_GLIB
-VINO_TELEPATHY_GLIB_SRC = \
+VINO_TELEPATHY_GLIB_sources = \
 	server/vino-tube-servers-manager.c \
 	server/vino-tube-servers-manager.h \
 	server/vino-tube-server.c \
@@ -199,8 +165,11 @@ vino_server_SOURCES = \
 	server/vino-dbus-error.h \
 	server/vino-upnp.h \
 	server/vino-upnp.c \
-	$(VINO_HTTP_SRC) \
-	$(VINO_TELEPATHY_GLIB_SRC)
+	$(VINO_MINIUPNP_sources) \
+	$(VINO_IFADDR_sources) \
+	$(VINO_LIBVNCSERVER_sources) \
+	$(VINO_HTTP_sources) \
+	$(VINO_TELEPATHY_GLIB_sources)
 
 server/vino-marshal.h: server/vino-marshal.list
 	$(AM_V_GEN)$(GLIB_GENMARSHAL) $< --header --prefix=vino_marshal > $@
diff --git a/configure.ac b/configure.ac
index 2051950..dfd3103 100644
--- a/configure.ac
+++ b/configure.ac
@@ -164,7 +164,7 @@ AC_ARG_WITH([gnutls],
     [ignore gnutls support and disable it])])
 
 AS_IF([test "x$with_gnutls" != "xno"],
-  [PKG_CHECK_MODULES([GNUTLS],
+  [PKG_CHECK_EXISTS([GNUTLS],
     [$GNUTLS_DEPS],
     [have_gnutls=yes],
     [have_gnutls=no])],
@@ -351,7 +351,6 @@ PKG_CHECK_MODULES([VINO_CAPPLET], [glib-2.0 >= $GLIB_VERSION gio-2.0 >= $GIO_VER
 PKG_CHECK_MODULES([VINO_TOOLS], [glib-2.0 >= $GLIB_VERSION gio-2.0 >= $GIO_VERSION gobject-2.0 >= $GLIB_VERSION $GNOME_KEYRING_DEPS])
 
 # EGG stuff
-PKG_CHECK_MODULES([EGG], [gtk+-3.0 >= $GTK_VERSION])
 PKG_CHECK_MODULES([EGG_SMCLIENT], [gtk+-3.0])
 
 GLIB_GSETTINGS



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