[vinagre] Link plugins into the vinagre binary, bug 653558
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Link plugins into the vinagre binary, bug 653558
- Date: Sat, 3 Dec 2011 08:18:35 +0000 (UTC)
commit 5d8c542dbbf7c8fb3c035c287a1d2a425237f43a
Author: Yaakov Selkowitz <yselkowitz users sourceforge net>
Date: Fri Dec 2 01:49:38 2011 -0600
Link plugins into the vinagre binary, bug 653558
Relying on linking the plugins dynamically into the executable is not
portable: it works only on ELF and even then only without -Wl,--as-needed.
Instead, the plugins must be statically linked into the main executable,
in which case there is no further reason for using libtool, so remove it.
Signed-off-by: Yaakov Selkowitz <yselkowitz users sourceforge net>
.gitignore | 27 +++---------
Makefile.am | 106 ++++++++++++----------------------------------
configure.ac | 10 ----
vinagre/vapi/config.vapi | 1 -
4 files changed, 33 insertions(+), 111 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e10f0bd..c4ac601 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,8 +2,6 @@
*vala.stamp
Makefile
Makefile.in
-/.deps
-/.libs
/*.tar.xz
/ABOUT-NLS
/ChangeLog
@@ -30,30 +28,20 @@ Makefile.in
/intltool-extract.in
/intltool-merge.in
/intltool-update.in
-/librdp.la
-/libreversevnc.la
-/libssh.la
-/libvinagre.la
-/libvnc.la
-/libtool
/m4/
/omf.make
-/plugins/rdp/*.lo
+/plugins/rdp/*.o
/plugins/rdp/.deps
/plugins/rdp/.dirstamp
-/plugins/rdp/.libs
-/plugins/spice/*.lo
+/plugins/spice/*.o
/plugins/spice/.deps
/plugins/spice/.dirstamp
-/plugins/spice/.libs
-/plugins/ssh/*.lo
+/plugins/ssh/*.o
/plugins/ssh/.deps
/plugins/ssh/.dirstamp
-/plugins/ssh/.libs
-/plugins/vnc/*.lo
+/plugins/vnc/*.o
/plugins/vnc/.deps
/plugins/vnc/.dirstamp
-/plugins/vnc/.libs
/po/.intltool-merge-cache
/po/Makefile.in.in
/po/Makevars.template
@@ -68,19 +56,16 @@ Makefile.in
/po/stamp-it
/po/*.gmo
/stamp-h1
-/vinagre/*.lo
/vinagre/*.o
/vinagre/.deps
/vinagre/.dirstamp
-/vinagre/.libs
-/vinagre/if/*.lo
+/vinagre/if/*.o
/vinagre/if/.deps
/vinagre/if/.dirstamp
/vinagre/if/.libs
-/vinagre/view/*.lo
+/vinagre/view/*.o
/vinagre/view/.deps
/vinagre/view/.dirstamp
-/vinagre/view/.libs
/vinagre/vinagre-dirs.c
/vinagre/vinagre-utils.c
/vinagre/vinagre
diff --git a/Makefile.am b/Makefile.am
index 6c6b90a..ead2efb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ DISTCHECK_CONFIGURE_FLAGS = \
--disable-scrollkeeper \
--enable-compile-warnings=maximum
-common_cppflags = \
+vinagre_vinagre_CPPFLAGS = \
-I$(top_builddir) \
-I$(top_builddir)/vinagre \
-I$(top_srcdir) \
@@ -19,13 +19,15 @@ common_cppflags = \
-DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" \
-DSSH_PROGRAM=\"$(SSH_PROGRAM)\" \
$(VINAGRE_CFLAGS) \
+ $(VNC_CFLAGS) \
$(WARN_CFLAGS) \
- $(DISABLE_DEPRECATED)
-
-AM_CPPFLAGS = \
- $(common_cppflags) \
+ $(DISABLE_DEPRECATED) \
-include config.h
+vinagre_vinagre_LDADD = \
+ $(VINAGRE_LIBS) \
+ $(VNC_LIBS)
+
AM_VALAFLAGS = \
--vapidir vinagre/vapi \
--pkg config \
@@ -33,24 +35,6 @@ AM_VALAFLAGS = \
bin_PROGRAMS = vinagre/vinagre
-if VINAGRE_HAVE_SELF_IFADDRS
-ifaddrs_sources = \
- vinagre/if/getifaddrs.c
-endif
-
-vinagre_vinagre_SOURCES = \
- vinagre/vinagre-main.c \
- vinagre/vinagre-options.c
-
-vinagre_vinagre_LDADD = \
- libvinagre.la \
- $(VINAGRE_LIBS) \
- $(GTKVNC_LIBS) \
- $(rdp_plugin) \
- $(spice_plugin) \
- $(ssh_plugin) \
- libvnc.la
-
noinst_vinagreh_headers = \
vinagre/if/ifaddrs.h \
vinagre/view/autoDrawer.h \
@@ -81,10 +65,9 @@ noinst_vinagreh_headers = \
vinagre/vinagre-window.h \
vinagre/vinagre-ssh.h
-# The main library
-noinst_LTLIBRARIES = libvinagre.la
-
-handwritten_sources = \
+vinagre_vinagre_SOURCES = \
+ vinagre/vinagre-main.c \
+ vinagre/vinagre-options.c \
vinagre/view/autoDrawer.c \
vinagre/view/drawer.c \
vinagre/view/ovBox.c \
@@ -110,32 +93,33 @@ handwritten_sources = \
vinagre/vinagre-cache-prefs.c \
vinagre/vinagre-protocol.c \
vinagre/vinagre-plugins-engine.c \
- $(ifaddrs_sources)
+ plugins/vnc/vinagre-vnc-plugin.c \
+ plugins/vnc/vinagre-vnc-connection.c \
+ plugins/vnc/vinagre-vnc-tab.c \
+ plugins/vnc/vinagre-vnc-tunnel.c
+
+if VINAGRE_HAVE_SELF_IFADDRS
+vinagre_vinagre_SOURCES += \
+ vinagre/if/getifaddrs.c
+endif
if VINAGRE_PTY_OPEN
noinst_vinagreh_headers += \
vinagre/pty_open.h
-handwritten_sources += \
+vinagre_vinagre_SOURCES += \
vinagre/pty_open.c
endif
-libvinagre_la_SOURCES = \
- $(handwritten_sources)
-
if VINAGRE_HAVE_AVAHI
-libvinagre_la_SOURCES += \
+vinagre_vinagre_SOURCES += \
vinagre/vinagre-mdns.c
noinst_vinagreh_headers += \
vinagre/vinagre-mdns.h
endif
-libvinagre_la_LDFLAGS = -export-dynamic -no-undefined -export-symbols-regex "^[[^_]].*"
-
-libvinagre_la_LIBADD = $(VINAGRE_LIBS)
-
# Telepathy stuff
if VINAGRE_HAVE_TELEPATHY_GLIB
-handwritten_sources += \
+vinagre_vinagre_SOURCES += \
vinagre/vinagre-tubes-manager.c \
vinagre/vinagre-tube-handler.c
noinst_vinagreh_headers += \
@@ -143,8 +127,6 @@ noinst_vinagreh_headers += \
vinagre/vinagre-tube-handler.h
endif
-plugindir = $(VINAGRE_PLUGINS_LIBS_DIR)
-
noinst_plugin_headers = \
plugins/rdp/vinagre-rdp-plugin.h \
plugins/rdp/vinagre-rdp-connection.h \
@@ -162,67 +144,33 @@ noinst_plugin_headers = \
plugins/vnc/vinagre-vnc-tunnel.h
if VINAGRE_ENABLE_RDP
-rdp_plugin = librdp.la
-
-librdp_la_SOURCES = \
+vinagre_vinagre_SOURCES += \
plugins/rdp/vinagre-rdp-plugin.c \
plugins/rdp/vinagre-rdp-connection.c \
plugins/rdp/vinagre-rdp-tab.c
-
-librdp_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-librdp_la_LIBADD = $(VINAGRE_LIBS)
endif
if VINAGRE_ENABLE_SPICE
-spice_plugin = libspice.la
-
-libspice_la_CPPFLAGS = \
- $(AM_CPPFLAGS) \
+vinagre_vinagre_CPPFLAGS += \
$(SPICE_CFLAGS) \
-I$(top_srcdir)/plugins/spice
-libspice_la_SOURCES = \
+vinagre_vinagre_SOURCES += \
plugins/spice/vinagre-spice-plugin.c \
plugins/spice/vinagre-spice-connection.c \
plugins/spice/vinagre-spice-tab.c \
plugins/spice/vinagre-spice-tunnel.c
-libspice_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libspice_la_LIBADD = $(SPICE_LIBS)
+vinagre_vinagre_LDADD += $(SPICE_LIBS)
endif
if VINAGRE_ENABLE_SSH
-ssh_plugin = libssh.la
-
-libssh_la_SOURCES = \
+vinagre_vinagre_SOURCES += \
plugins/ssh/vinagre-ssh-plugin.c \
plugins/ssh/vinagre-ssh-connection.c \
plugins/ssh/vinagre-ssh-tab.c
-
-libssh_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libssh_la_LIBADD = $(VINAGRE_LIBS)
endif
-plugin_LTLIBRARIES = \
- $(rdp_plugin) \
- $(spice_plugin) \
- $(ssh_plugin) \
- libvnc.la
-
-libvnc_la_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- $(VNC_CFLAGS) \
- -I$(top_srcdir)
-
-libvnc_la_SOURCES = \
- plugins/vnc/vinagre-vnc-plugin.c \
- plugins/vnc/vinagre-vnc-connection.c \
- plugins/vnc/vinagre-vnc-tab.c \
- plugins/vnc/vinagre-vnc-tunnel.c
-
-libvnc_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libvnc_la_LIBADD = $(VNC_LIBS)
-
iconthemedir = $(datadir)/icons/hicolor
mimeicon16dir = $(iconthemedir)/16x16/mimetypes
mimeicon22dir = $(iconthemedir)/22x22/mimetypes
diff --git a/configure.ac b/configure.ac
index fa885fb..2d95052 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,10 +17,6 @@ AM_MAINTAINER_MODE([enable])
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES
-LT_PREREQ([2.2.6])
-LT_INIT([disable-static])
-
-# Libtool requires this, but it is only expanded once anyway.
AC_CANONICAL_HOST
AC_MSG_CHECKING([whether to build for a Windows host])
@@ -33,12 +29,6 @@ PKG_PROG_PKG_CONFIG([0.16])
AC_PROG_SED
-AC_SUBST([VINAGRE_ABI_VERSION], [3.0])
-AC_DEFINE_UNQUOTED([VINAGRE_ABI_VERSION], ["$VINAGRE_ABI_VERSION"], [Vinagre ABI version])
-
-AC_SUBST([PLUGIN_LIBTOOL_FLAGS], ["-avoid-version"])
-AC_SUBST([VINAGRE_PLUGINS_LIBS_DIR], ["$libdir/vinagre-$VINAGRE_ABI_VERSION/plugins"])
-
GLIB_DEPS="glib-2.0 >= 2.28.0 $gio_os >= 2.28.0"
GTHREAD_DEPS="gthread-2.0 >= 2.0.0"
GTK_DEPS="gtk+-3.0 >= 3.0.3"
diff --git a/vinagre/vapi/config.vapi b/vinagre/vapi/config.vapi
index 4f13d60..6294cf2 100644
--- a/vinagre/vapi/config.vapi
+++ b/vinagre/vapi/config.vapi
@@ -7,6 +7,5 @@ namespace Vinagre.Config
public const string PACKAGE_TARNAME;
public const string PACKAGE_URL;
public const string PACKAGE_VERSION;
- public const string VINAGRE_ABI_VERSION;
public const string VINAGRE_DATADIR;
} // namespace Vinagre.Config
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]