[libwnck] build: Add --enable-tools to enable/disable installation of tools



commit 21538b70a9d493d33021b806f830091591f66815
Author: Vincent Untz <vuntz gnome org>
Date:   Mon May 14 16:32:25 2012 +0200

    build: Add --enable-tools to enable/disable installation of tools
    
    This helps make libwnck 2.x and 3.x be parallel-installable since they
    conflict for wnckprop and wnck-urgency-monitor.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=671558

 configure.ac        |    7 +++++++
 libwnck/Makefile.am |   14 +++++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 83df21b..082157d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,6 +61,12 @@ if test "x$enable_deprecation_flags" = "xyes"; then
    AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
 fi
 
+AC_ARG_ENABLE(tools,
+              [AC_HELP_STRING([--enable-tools],
+                              [install wnck-based tools @<:@default=yes@:>@])],,
+              [enable_tools=yes])
+AM_CONDITIONAL(ENABLE_TOOLS, test "x$enable_tools" != "xno")
+
 GETTEXT_PACKAGE=libwnck-3.0
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Package name])
@@ -194,5 +200,6 @@ echo "
         XRes support:                 ${have_xres}
         Build introspection support:  ${found_introspection}
         Build gtk-doc documentation:  ${enable_gtk_doc}
+        Install wnck-based tools:     ${enable_tools}
 
 "
diff --git a/libwnck/Makefile.am b/libwnck/Makefile.am
index 2bdc47a..b77e7ac 100644
--- a/libwnck/Makefile.am
+++ b/libwnck/Makefile.am
@@ -1,7 +1,5 @@
 lib_LTLIBRARIES = libwnck-3.la
-bin_PROGRAMS =			\
-	wnckprop		\
-	wnck-urgency-monitor
+bin_PROGRAMS =
 noinst_PROGRAMS =		\
 	test-pager		\
 	test-wnck		\
@@ -10,6 +8,16 @@ noinst_PROGRAMS =		\
 	test-urgent		\
 	test-shutdown
 
+if ENABLE_TOOLS
+bin_PROGRAMS +=			\
+	wnckprop		\
+	wnck-urgency-monitor
+else
+noinst_PROGRAMS +=		\
+	wnckprop		\
+	wnck-urgency-monitor
+endif
+
 AM_CPPFLAGS =					\
 	$(LIBWNCK_CFLAGS)			\
 	-I$(top_srcdir)				\



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