[Xfce4-commits] <xfce4-embed-plugin:master> Compiling the plugin as a module.

David Schneider noreply at xfce.org
Wed Feb 15 08:56:01 CET 2012


Updating branch refs/heads/master
         to d917a3a17873aebc8c92aa047bb42ba66d37d9a1 (commit)
       from df30dc4092cd9c97fa5b4a68fc5d5e0dd2ea97fa (commit)

commit d917a3a17873aebc8c92aa047bb42ba66d37d9a1
Author: David Schneider <dnschneid at gmail.com>
Date:   Tue Feb 14 23:36:47 2012 -0800

    Compiling the plugin as a module.

 .gitignore                       |    6 ++++--
 configure.ac.in                  |    7 ++++++-
 panel-plugin/Makefile.am         |   19 +++++++++++++------
 panel-plugin/embed.c             |    2 +-
 panel-plugin/embed.desktop.in.in |    3 ++-
 5 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0599079..cf31546 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
-*.o
+*.la
+*.lo
 *.swp
 .deps
+.libs
 ChangeLog
 INSTALL
 Makefile
@@ -18,7 +20,7 @@ ltmain.sh
 missing
 mkinstalldirs
 panel-plugin/embed.desktop
-panel-plugin/xfce4-embed-plugin
+panel-plugin/embed.desktop.in
 po/.intltool-merge-cache
 po/POTFILES
 stamp-*
diff --git a/configure.ac.in b/configure.ac.in
index 37c99f0..dd3485b 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -33,6 +33,12 @@ AM_CONFIG_HEADER([config.h])
 AM_MAINTAINER_MODE()
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
+dnl **************************
+dnl *** Initialize libtool ***
+dnl **************************
+LT_PREREQ([2.2.6])
+LT_INIT([disable-static])
+
 dnl *******************************
 dnl *** Check for UNIX variants ***
 dnl *******************************
@@ -47,7 +53,6 @@ AM_PROG_CC_C_O()
 AC_PROG_LD()
 AC_PROG_INSTALL()
 AC_PROG_INTLTOOL()
-AC_PROG_LIBTOOL()
 
 dnl **********************************
 dnl *** Check for standard headers ***
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index f194f81..09c400d 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -7,13 +7,13 @@ INCLUDES = \
 #
 # Embed plugin
 #
-plugin_PROGRAMS = \
-	xfce4-embed-plugin
+plugin_LTLIBRARIES = \
+	libembed.la
 
 plugindir = \
 	$(libdir)/xfce4/panel/plugins
 
-xfce4_embed_plugin_SOURCES = \
+libembed_la_SOURCES = \
 	embed.c \
 	embed.h \
 	embed-dialogs.c \
@@ -21,14 +21,21 @@ xfce4_embed_plugin_SOURCES = \
 	ewmh.c \
 	ewmh.h
 
-xfce4_embed_plugin_CFLAGS = \
+libembed_la_CFLAGS = \
 	$(LIBXFCE4UTIL_CFLAGS) \
 	$(LIBXFCE4UI_CFLAGS) \
 	$(LIBXFCE4PANEL_CFLAGS) \
 	$(LIBX11_CFLAGS) \
 	$(PLATFORM_CFLAGS)
 
-xfce4_embed_plugin_LDADD = \
+libembed_la_LDFLAGS = \
+	-avoid-version \
+	-module \
+	-no-undefined \
+	-export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+	$(PLATFORM_LDFLAGS)
+
+libembed_la_LIBADD = \
 	$(LIBXFCE4UTIL_LIBS) \
 	$(LIBXFCE4UI_LIBS) \
 	$(LIBXFCE4PANEL_LIBS) \
@@ -46,7 +53,7 @@ desktop_in_in_files =							\
 desktop_in_files =							\
 	$(desktop_in_in_files:.desktop.in.in=.desktop.in)
 
-%.desktop.in: %.desktop.in.in
+$(desktop_in_files): $(desktop_in_in_files)
 	sed -e "s,\@libdir\@,$(libdir),g" < $< > $@
 
 desktop_DATA =								\
diff --git a/panel-plugin/embed.c b/panel-plugin/embed.c
index 6991447..ef977e2 100644
--- a/panel-plugin/embed.c
+++ b/panel-plugin/embed.c
@@ -67,7 +67,7 @@ embed_add_fake_socket (EmbedPlugin *embed);
 
 
 /* register the plugin */
-XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL (embed_construct);
+XFCE_PANEL_PLUGIN_REGISTER (embed_construct);
 
 
 /* Save the plugin settings. */
diff --git a/panel-plugin/embed.desktop.in.in b/panel-plugin/embed.desktop.in.in
index f7bc5fe..e0e6500 100644
--- a/panel-plugin/embed.desktop.in.in
+++ b/panel-plugin/embed.desktop.in.in
@@ -4,4 +4,5 @@ Encoding=UTF-8
 _Name=Embed Plugin
 _Comment=Embeds an arbitrary window into the panel
 Icon=xfce4-panel
-X-XFCE-Exec=@libdir@/xfce4/panel/plugins/xfce4-embed-plugin
+X-XFCE-Module=embed
+X-XFCE-Internal=false


More information about the Xfce4-commits mailing list