[gnome-utils] build: Allow disabling the panel applet
- From: Emmanuele Bassi <ebassi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-utils] build: Allow disabling the panel applet
- Date: Sat, 13 Feb 2010 19:37:42 +0000 (UTC)
commit 50b7366a140fcca6264c5e17c76a6a2c6e388ab8
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Sat Feb 13 19:32:59 2010 +0000
build: Allow disabling the panel applet
The plans for GNOME 3.0 currently do not foresee the presence of a
"gnome-panel applet" in the UI; also, some GNOME-based platforms (like
Moblin) do not use the gnome-panel at all, even though they still ship
the Dictionary application.
For these reasons we should provide a way to optionally disable building
the gnome-panel Dictionary applet.
configure.ac | 26 ++++++++++++++++++++++----
gnome-dictionary/data/Makefile.am | 4 ++++
gnome-dictionary/src/Makefile.am | 6 ++++++
3 files changed, 32 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5ff33b9..74f13cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,10 +141,27 @@ AS_IF([test "x$GCONFTOOL" = "xno"],
AM_GCONF_SOURCE_2
-# Gdict applet checks
-PKG_CHECK_MODULES(APPLET, libpanelapplet-2.0 >= $LIBPANEL_APPLET_REQUIRED)
-AC_SUBST(APPLET_LIBS)
-AC_SUBST(APPLET_CFLAGS)
+AC_ARG_ENABLE([gdict-applet],
+ [AC_HELP_STRING([--enable-gdict-applet=@<:@yes/no@:>@],
+ [Whether to build the Dictionary gnome-panel applet])],
+ [],
+ [enable_gdict_applet=yes])
+
+AS_CASE([$enable_gdict_applet],
+ [yes],
+ [
+ # Gdict applet checks
+ PKG_CHECK_MODULES(APPLET, libpanelapplet-2.0 >= $LIBPANEL_APPLET_REQUIRED)
+ AC_SUBST(APPLET_LIBS)
+ AC_SUBST(APPLET_CFLAGS)
+ ],
+
+ [no], [],
+
+ [*], [AC_MSG_ERROR([Invalid value for --enable-gdict-applet])]
+)
+
+AM_CONDITIONAL([BUILD_GDICT_APPLET], [test "x$enable_gdict_applet" = "xyes"])
# Baobab checks
PKG_CHECK_MODULES(LIBGTOP, libgtop-2.0 >= $LIBGTOP_REQUIRED)
@@ -403,4 +420,5 @@ gnome-utils $VERSION configuration summary:
Debug messages (libgdict) : $enable_debug
API Reference (libgdict) : $enable_gtk_doc
Logview built with ZLib support : $msg_zlib
+ Dictionary gnome-panel applet : $enable_gdict_applet
"
diff --git a/gnome-dictionary/data/Makefile.am b/gnome-dictionary/data/Makefile.am
index 00d3ea8..31c4908 100644
--- a/gnome-dictionary/data/Makefile.am
+++ b/gnome-dictionary/data/Makefile.am
@@ -28,6 +28,8 @@ builder_DATA = gnome-dictionary-preferences.ui \
uidir = $(datadir)/gnome-dictionary
ui_DATA = gnome-dictionary-ui.xml
+if BUILD_GDICT_APPLET
+
# applet menu definition
appletuidir = $(datadir)/gnome-2.0/ui
appletui_DATA = GNOME_DictionaryApplet.xml
@@ -45,6 +47,8 @@ $(server_in_files): $(server_in_files:.server.in=.server.in.in)
@INTLTOOL_SERVER_RULE@
+endif # BUILD_GDICT_APPLET
+
schemadir = $(GCONF_SCHEMA_FILE_DIR)
schemas_in_file = gnome-dictionary.schemas.in
schema_DATA = $(schemas_in_file:.schemas.in=.schemas)
diff --git a/gnome-dictionary/src/Makefile.am b/gnome-dictionary/src/Makefile.am
index c3370c9..50f4e23 100644
--- a/gnome-dictionary/src/Makefile.am
+++ b/gnome-dictionary/src/Makefile.am
@@ -12,7 +12,9 @@ INCLUDES = \
bin_PROGRAMS = gnome-dictionary
+if BUILD_GDICT_APPLET
libexec_PROGRAMS = gnome-dictionary-applet
+endif
gnome_dictionary_SOURCES = \
gdict-about.c \
@@ -43,6 +45,8 @@ gnome_dictionary_LDADD = \
$(GNOME_UTILS_LIBS) \
$(NULL)
+if BUILD_GDICT_APPLET
+
gnome_dictionary_applet_SOURCES = \
gdict-about.c \
gdict-about.h \
@@ -72,3 +76,5 @@ gnome_dictionary_applet_LDADD = \
$(GNOME_UTILS_LIBS) \
$(APPLET_LIBS) \
$(NULL)
+
+endif # BUILD_GDICT_APPLET
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]