[Xfce4-commits] <xfce4-mailwatch-plugin:master> Merge branch 'jansucan/build'
Ján SuÄan
noreply at xfce.org
Thu Sep 12 11:50:02 CEST 2013
Updating branch refs/heads/master
to f4e901eb256f99585fcfdc0bfbaa1452a4b3e37e (commit)
from da287e6157f4a889a85efd6730cb63af850d0bee (commit)
commit f4e901eb256f99585fcfdc0bfbaa1452a4b3e37e
Merge: da287e6 c9aa7a4
Author: Ján Sučan <sucan at runbox.com>
Date: Thu Sep 12 11:29:09 2013 +0200
Merge branch 'jansucan/build'
commit c9aa7a4b835ad542d09f6449811a12714926212c
Author: Ján Sučan <sucan at runbox.com>
Date: Mon Sep 9 14:33:32 2013 +0200
Update build files and layout of the files
This update was inspired by the xfce4-sample-plugin.
Makefile.am | 28 ++----
configure.ac.in | 138 ++++++++++++++++----------
icons/48x48/Makefile.am | 7 ++
{pixmaps => icons/48x48}/xfce-newmail.png | Bin 1494 -> 1494 bytes
{pixmaps => icons/48x48}/xfce-nomail.png | Bin 1314 -> 1314 bytes
icons/Makefile.am | 16 +++
icons/scalable/Makefile.am | 7 ++
{pixmaps => icons/scalable}/xfce-newmail.svg | 0
{pixmaps => icons/scalable}/xfce-nomail.svg | 0
libmailwatch-core/Makefile.am | 24 +++--
libmailwatch-core/mailwatch.c | 2 +-
panel-plugin/Makefile.am | 26 +++--
panel-plugin/mailwatch-plugin.c | 2 +-
pixmaps/Makefile.am | 20 ----
14 files changed, 156 insertions(+), 114 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 7d75959..ff7db3d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,17 +1,12 @@
- at SET_MAKE@
-
SUBDIRS = \
doc \
+ icons \
libmailwatch-core \
panel-plugin \
- pixmaps \
po
-$(top_srcdir)/configure: $(top_srcdir)/configure.ac
- [ -x $(top_srcdir)/autogen.sh ] && cd $(top_srcdir) && NOCONFIGURE=1 ./autogen.sh || /bin/true
-
-html:
- $(MAKE) -C doc html
+distclean-local:
+ rm -rf *.cache *~
.PHONY: ChangeLog
@@ -25,21 +20,10 @@ dist-hook: ChangeLog
EXTRA_DIST = \
intltool-extract.in \
intltool-merge.in \
- intltool-update.in \
- TODO
+ intltool-update.in
DISTCLEANFILES = \
intltool-extract \
intltool-merge \
- intltool-update
-
-checksums: distcheck
- sha1sum $(PACKAGE)-$(VERSION).tar.bz2 > $(PACKAGE)-$(VERSION).tar.bz2.sha1.asc
-
-gpg-sign: checksums
- gpg -b --armor $(PACKAGE)-$(VERSION).tar.bz2
-
-release: gpg-sign
- -mkdir releases/
- mv $(PACKAGE)-$(VERSION).tar.bz2* releases/
- -rm $(PACKAGE)-$(VERSION).tar.gz
+ intltool-update \
+ intltool-update-tmp
diff --git a/configure.ac.in b/configure.ac.in
index 7c36b24..d2ad9a6 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -1,72 +1,84 @@
-dnl configure.ac.in
dnl
dnl xfce4-mailwatch-plugin - a mail notification plugin for the xfce4 panel
dnl
-dnl version info
+dnl ***************************
+dnl *** Version information ***
+dnl ***************************
m4_define([mailwatch_version_major], [1])
m4_define([mailwatch_version_minor], [1])
m4_define([mailwatch_version_micro], [0])
+m4_define([mailwatch_version_nano], []) dnl leave this empty to have no nano version
m4_define([mailwatch_version_build], [@REVISION@])
m4_define([mailwatch_version_tag], [git])
-m4_define([mailwatch_version], [mailwatch_version_major().mailwatch_version_minor().mailwatch_version_micro()ifelse(mailwatch_version_tag(), [git], [mailwatch_version_tag()-mailwatch_version_build()], [mailwatch_version_tag()])])
+m4_define([mailwatch_version], [mailwatch_version_major().mailwatch_version_minor().mailwatch_version_micro()ifelse(mailwatch_version_nano(), [], [], [.mailwatch_version_nano()])ifelse(mailwatch_version_tag(), [git], [mailwatch_version_tag()-mailwatch_version_build()], [mailwatch_version_tag()])])
-dnl init autoconf
-AC_INIT([xfce4-mailwatch-plugin], [mailwatch_version],
- [http://bugzilla.xfce.org/])
+dnl ***************************
+dnl *** Initialize autoconf ***
+dnl ***************************
+AC_INIT([xfce4-mailwatch-plugin], [mailwatch_version], [http://bugzilla.xfce.org/])
AC_PREREQ([2.50])
+AC_REVISION([mailwatch_version_build])
-dnl init automake
-AM_INIT_AUTOMAKE([dist-bzip2])
+dnl ***************************
+dnl *** Initialize automake ***
+dnl ***************************
+AM_INIT_AUTOMAKE([1.8 no-dist-gzip dist-bzip2 tar-ustar])
AM_CONFIG_HEADER([config.h])
-AM_MAINTAINER_MODE
-
-dnl check for UNIX variants
-AC_AIX
-AC_ISC_POSIX
-AC_MINIX
-AM_CONDITIONAL([HAVE_CYGWIN], [test "`uname | grep \"CYGWIN\"`" != ""])
-
-dnl check for basic programs
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_INSTALL
-AC_PROG_INTLTOOL([0.31], [no-xml])
+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 check for standard header files
-AC_HEADER_STDC
-AC_CHECK_HEADERS([errno.h fcntl.h math.h netdb.h netinet/in.h \
- signal.h stddef.h string.h sys/select.h \
- sys/socket.h sys/stat.h sys/types.h sys/wait.h \
- time.h unistd.h])
-AC_CHECK_FUNCS([mmap sigaction srandom])
-
-dnl Check for i18n support
+dnl *******************************
+dnl *** Check for UNIX variants ***
+dnl *******************************
+AC_AIX()
+AC_ISC_POSIX()
+
+dnl ********************************
+dnl *** Check for basic programs ***
+dnl ********************************
+AC_PROG_CC()
+AM_PROG_CC_C_O()
+AC_PROG_LD()
+AC_PROG_INSTALL()
+AC_PROG_INTLTOOL()
+
+dnl **********************************
+dnl *** Check for standard headers ***
+dnl **********************************
+AC_HEADER_STDC()
+AC_CHECK_HEADERS([stdlib.h unistd.h locale.h stdio.h errno.h time.h string.h \
+ math.h sys/types.h sys/wait.h memory.h signal.h sys/prctl.h \
+ libintl.h fcntl.h netdb.h netinet/in.h stddef.h sys/select.h \
+ sys/socket.h sys/stat.h])
+AC_CHECK_FUNCS([mmap sigaction srandom bind_textdomain_codeset])
+
+dnl ******************************
+dnl *** Check for i18n support ***
+dnl ******************************
XDT_I18N([@LINGUAS@])
-dnl Check for X11 installed
-XDT_CHECK_LIBX11_REQUIRE
-XDT_CHECK_LIBSM
+dnl *******************************
+dnl *** Check for X11 installed ***
+dnl *******************************
+XDT_CHECK_LIBX11_REQUIRE()
-dnl required
+dnl ***********************************
+dnl *** Check for required packages ***
+dnl ***********************************
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.18.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.18.0])
-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0])
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0])
+XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0])
XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0])
-dnl see if we have a new enough libxfce4util for the posix signal handler stuff
-saved_CFLAGS="$CFLAGS"
-saved_LIBS="$LIBS"
-CFLAGS="$CFLAGS $LIBXFCE4UTIL_CFLAGS"
-LIBS="$LIBS $LIBXFCE4UTIL_LIBS"
-AC_CHECK_FUNCS([xfce_posix_signal_handler_init])
-CFLAGS="$saved_CFLAGS"
-LIBS="$saved_LIBS"
-
-dnl check for gnutls and libgcrypt support
+dnl Check for gnutls and libgcrypt support
XDT_CHECK_OPTIONAL_PACKAGE([GNUTLS], [gnutls], [1.2.0], [ssl],
[gnutls and libgcrypt support for secure IMAP/POP3 connections], [yes])
if test "x$GNUTLS_FOUND" = "xyes"; then
@@ -79,7 +91,7 @@ fi
AM_CONDITIONAL([HAVE_SSL_SUPPORT],
[test "x$GNUTLS_FOUND" = "xyes" -a "x$LIBGCRYPT_FOUND" = "xyes"])
-dnl to ipv6, or to not ipv6
+dnl Check for IPv6 support
AC_MSG_CHECKING([whether to support IPv6])
AC_ARG_ENABLE([ipv6],
[AC_HELP_STRING([--disable-ipv6],
@@ -91,11 +103,26 @@ if test "x$enable_ipv6_support" = "xyes"; then
[Define if IPv6 support should be enabled])
fi
-dnl suppress warnings related to GStaticMutexes
+dnl Suppress warnings related to GStaticMutexes
XDT_SUPPORTED_FLAGS([CFLAGS], [-fno-strict-aliasing])
-dnl check for debugging support
-XDT_FEATURE_DEBUG
+dnl ***********************************
+dnl *** Check for debugging support ***
+dnl ***********************************
+XDT_FEATURE_DEBUG()
+
+dnl *********************************
+dnl *** Substitute platform flags ***
+dnl *********************************
+AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
+AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
+AC_SUBST([PLATFORM_CPPFLAGS])
+AC_MSG_CHECKING([PLATFORM_CFLAGS])
+AC_MSG_RESULT([$PLATFORM_CFLAGS])
+AC_SUBST([PLATFORM_CFLAGS])
+AC_MSG_CHECKING([PLATFORM_LDFLAGS])
+AC_MSG_RESULT([$PLATFORM_LDFLAGS])
+AC_SUBST([PLATFORM_LDFLAGS])
AC_DEFINE_UNQUOTED([WEBSITE],
["http://spuriousinterrupt.org/projects/mailwatch"],
@@ -107,8 +134,19 @@ doc/Makefile
doc/C/Makefile
doc/C/images/Makefile
doc/version
+icons/Makefile
+icons/48x48/Makefile
+icons/scalable/Makefile
libmailwatch-core/Makefile
panel-plugin/Makefile
-pixmaps/Makefile
po/Makefile.in
])
+
+dnl ***************************
+dnl *** Print configuration ***
+dnl ***************************
+echo
+echo "Build Configuration:"
+echo
+echo "* Debug Support: $enable_debug"
+echo
diff --git a/icons/48x48/Makefile.am b/icons/48x48/Makefile.am
new file mode 100644
index 0000000..628ca75
--- /dev/null
+++ b/icons/48x48/Makefile.am
@@ -0,0 +1,7 @@
+iconsdir = $(datadir)/icons/hicolor/48x48/apps
+icons_DATA = \
+ xfce-nomail.png \
+ xfce-newmail.png
+
+EXTRA_DIST = \
+ $(icons_DATA)
diff --git a/pixmaps/xfce-newmail.png b/icons/48x48/xfce-newmail.png
similarity index 100%
rename from pixmaps/xfce-newmail.png
rename to icons/48x48/xfce-newmail.png
diff --git a/pixmaps/xfce-nomail.png b/icons/48x48/xfce-nomail.png
similarity index 100%
rename from pixmaps/xfce-nomail.png
rename to icons/48x48/xfce-nomail.png
diff --git a/icons/Makefile.am b/icons/Makefile.am
new file mode 100644
index 0000000..b20b756
--- /dev/null
+++ b/icons/Makefile.am
@@ -0,0 +1,16 @@
+SUBDIRS = \
+ 48x48 \
+ scalable
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(gtk_update_icon_cache); \
+ else \
+ echo "*** Icon cache not updated. Remember to run:"; \
+ echo "***"; \
+ echo "*** $(gtk_update_icon_cache)"; \
+ echo "***"; \
+ fi
diff --git a/icons/scalable/Makefile.am b/icons/scalable/Makefile.am
new file mode 100644
index 0000000..5024a5b
--- /dev/null
+++ b/icons/scalable/Makefile.am
@@ -0,0 +1,7 @@
+iconsdir = $(datadir)/icons/hicolor/scalable/apps
+icons_DATA = \
+ xfce-nomail.svg \
+ xfce-newmail.svg
+
+EXTRA_DIST = \
+ $(icons_DATA)
diff --git a/pixmaps/xfce-newmail.svg b/icons/scalable/xfce-newmail.svg
similarity index 100%
rename from pixmaps/xfce-newmail.svg
rename to icons/scalable/xfce-newmail.svg
diff --git a/pixmaps/xfce-nomail.svg b/icons/scalable/xfce-nomail.svg
similarity index 100%
rename from pixmaps/xfce-nomail.svg
rename to icons/scalable/xfce-nomail.svg
diff --git a/libmailwatch-core/Makefile.am b/libmailwatch-core/Makefile.am
index 00ea3e7..3a28f55 100644
--- a/libmailwatch-core/Makefile.am
+++ b/libmailwatch-core/Makefile.am
@@ -1,8 +1,14 @@
+AM_CPPFLAGS = \
+ -DG_LOG_DOMAIN=\"libmailwatch-core\" \
+ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
+ $(PLATFORM_CPPFLAGS)
+
# gmail is not always built
EXTRA_DIST = \
mailwatch-mailbox-gmail.c
-noinst_LTLIBRARIES = libmailwatch-core.la
+noinst_LTLIBRARIES = \
+ libmailwatch-core.la
libmailwatch_core_la_SOURCES = \
mailwatch-common.c \
@@ -21,14 +27,14 @@ libmailwatch_core_la_SOURCES = \
mailwatch.h
if HAVE_SSL_SUPPORT
-libmailwatch_core_la_SOURCES += mailwatch-mailbox-gmail.c
+libmailwatch_core_la_SOURCES += \
+ mailwatch-mailbox-gmail.c
endif
libmailwatch_core_la_CFLAGS = \
- @GTHREAD_CFLAGS@ \
- @GTK_CFLAGS@ \
- @LIBXFCE4UI_CFLAGS@ \
- @GNUTLS_CFLAGS@ \
- @LIBGCRYPT_CFLAGS@ \
- -DDATADIR=\"$(datadir)\" \
- -DLOCALEDIR=\"$(localedir)\"
+ $(GTHREAD_CFLAGS) \
+ $(GTK_CFLAGS) \
+ $(LIBXFCE4UI_CFLAGS) \
+ $(GNUTLS_CFLAGS) \
+ $(LIBGCRYPT_CFLAGS) \
+ $(PLATFORM_CFLAGS)
diff --git a/libmailwatch-core/mailwatch.c b/libmailwatch-core/mailwatch.c
index 1a51400..a7e8563 100644
--- a/libmailwatch-core/mailwatch.c
+++ b/libmailwatch-core/mailwatch.c
@@ -114,7 +114,7 @@ xfce_mailwatch_new(void)
{
XfceMailwatch *mailwatch;
- xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
+ xfce_textdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
if(!g_thread_supported()) {
g_thread_init(NULL);
diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am
index 0263bc7..251bdf9 100644
--- a/panel-plugin/Makefile.am
+++ b/panel-plugin/Makefile.am
@@ -1,3 +1,7 @@
+AM_CPPFLAGS = \
+ -DG_LOG_DOMAIN=\"libmailwatch\" \
+ -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
+ $(PLATFORM_CPPFLAGS)
#
# Mailwatch plugin
#
@@ -14,25 +18,25 @@ libmailwatch_plugin_la_DEPENDENCIES = \
libmailwatch_plugin_la_CFLAGS = \
-I$(top_srcdir)/libmailwatch-core \
- @GTHREAD_CFLAGS@ \
- @LIBXFCE4PANEL_CFLAGS@ \
- @LIBXFCE4UI_CFLAGS@ \
- -DDATADIR=\"$(datadir)\" \
- -DLOCALEDIR=\"$(localedir)\"
+ $(GTHREAD_CFLAGS) \
+ $(LIBXFCE4PANEL_CFLAGS) \
+ $(LIBXFCE4UI_CFLAGS) \
+ $(PLATFORM_CFLAGS)
libmailwatch_plugin_la_LDFLAGS = \
-avoid-version \
-module \
-no-undefined \
- -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)'
+ -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \
+ $(PLATFORM_LDFLAGS)
libmailwatch_plugin_la_LIBADD = \
$(top_builddir)/libmailwatch-core/libmailwatch-core.la \
- @GTHREAD_LIBS@ \
- @LIBXFCE4PANEL_LIBS@ \
- @LIBXFCE4UI_LIBS@ \
- @GNUTLS_LIBS@ \
- @LIBGCRYPT_LIBS@
+ $(GTHREAD_LIBS) \
+ $(LIBXFCE4PANEL_LIBS) \
+ $(LIBXFCE4UI_LIBS) \
+ $(GNUTLS_LIBS) \
+ $(LIBGCRYPT_LIBS)
#
# Desktop file
diff --git a/panel-plugin/mailwatch-plugin.c b/panel-plugin/mailwatch-plugin.c
index d15e1a1..1d1c9e1 100644
--- a/panel-plugin/mailwatch-plugin.c
+++ b/panel-plugin/mailwatch-plugin.c
@@ -1056,7 +1056,7 @@ mailwatch_construct(XfcePanelPlugin *plugin)
#endif
};
- xfce_textdomain(GETTEXT_PACKAGE, LOCALEDIR, "UTF-8");
+ xfce_textdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
if(!(mwp = mailwatch_create(plugin)))
exit(1);
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
deleted file mode 100644
index 66b82e3..0000000
--- a/pixmaps/Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
-pngdir = $(datadir)/icons/hicolor/48x48/apps
-png_DATA = xfce-newmail.png xfce-nomail.png
-
-svgdir = $(datadir)/icons/hicolor/scalable/apps
-svg_DATA = xfce-newmail.svg xfce-nomail.svg
-
-EXTRA_DIST = $(png_DATA) $(svg_DATA)
-
-gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
-
-install-data-hook:
- @-if test -z "$(DESTDIR)"; then \
- echo "Updating Gtk icon cache."; \
- $(gtk_update_icon_cache); \
- else \
- echo "*** Icon cache not updated. Remember to run:"; \
- echo "***"; \
- echo "*** $(gtk_update_icon_cache)"; \
- echo "***"; \
- fi
More information about the Xfce4-commits
mailing list