From 7a241499c6cef5885bdacf0e5ff213649f26b953 Mon Sep 17 00:00:00 2001 From: Yury G. Kudryashov Date: Sat, 2 Jan 2010 18:24:52 +0300 Subject: [PATCH] Get rid of automagic GConf dependency. configure --disable-migration-tool will not look for GConf. --- configure.ac | 45 ++++++++++++++++++++++++++++++++++++++++----- util/Makefile.am | 2 +- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 0a4a1ca..d19ba9e 100644 --- a/configure.ac +++ b/configure.ac @@ -315,12 +315,47 @@ PKG_CHECK_MODULES(TELEPATHY, telepathy-glib >= 0.7.37) AC_SUBST(TELEPATHY_LIBS) AC_SUBST(TELEPATHY_CFLAGS) +migration_enabled="auto" +AC_MSG_CHECKING(whether to build mission-control-4.x migration tool) +AC_ARG_ENABLE(migration-tool, + [ --enable-migration-tool build mission-control-4.x migration tool. default=auto], + [ + AC_MSG_RESULT(${enableval}) + migration_enabled="${enableval}" + ], + [ + AC_MSG_RESULT(auto) + migration_enabled="auto" + ] +) + GCONF_REQUIRED_VERSION=2.0.0 -PKG_CHECK_MODULES(GCONF, gconf-2.0 >= $GCONF_REQUIRED_VERSION, - [HAVE_GCONF=yes], [HAVE_GCONF=no]) -AM_CONDITIONAL(HAVE_GCONF, [test x$HAVE_GCONF = xyes]) -AC_SUBST(GCONF_CFLAGS) -AC_SUBST(GCONF_LIBS) +if test "x$migration_enabled" = xauto +then + AC_MSG_CHECKING(whether mission-control-4.x migration tool will be built) + PKG_CHECK_EXISTS([gconf-2.0 >= $GCONF_REQUIRED_VERSION], + [ + AC_MSG_RESULT(yes) + migration_enabled=yes + ], + [ + AC_MSG_RESULT(no) + migration_enabled=no + ] + ) +fi + +AM_CONDITIONAL(ENABLE_MIGRATION_TOOL, [test x$migration_enabled = xyes]) + +if test "x$migration_enabled" = xyes +then + PKG_CHECK_MODULES([GCONF], [gconf-2.0 >= $GCONF_REQUIRED_VERSION]) + AC_SUBST(GCONF_CFLAGS) + AC_SUBST(GCONF_LIBS) + AC_DEFINE([ENABLE_MIGRATION_TOOL], [1], [Define whether to build migration tool]) +else + AC_DEFINE([ENABLE_MIGRATION_TOOL], [0], [Define whether to build migration tool]) +fi PKG_CHECK_MODULES(GLIB, glib-2.0 gobject-2.0) AC_SUBST(GLIB_LIBS) diff --git a/util/Makefile.am b/util/Makefile.am index f32f873..95fa52c 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -20,7 +20,7 @@ CLEANFILES = $(man1_MANS) mc-wait-for-name.1: mc-wait-for-name.1.in Makefile sed -e 's![@]bindir[@]!@bindir@!g' < $< > $@ -if HAVE_GCONF +if ENABLE_MIGRATION_TOOL bin_PROGRAMS += mc-account-convert mc_account_convert_CPPFLAGS = $(GCONF_CFLAGS) -- 1.6.6.2