[tracker] Fixes GB#615563 - Proper handling of --enable-evolution-miner configure option



commit 65d7f0ac57421c4b043facead29de45cc65587a3
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Mon Apr 12 20:01:03 2010 +0200

    Fixes GB#615563 - Proper handling of --enable-evolution-miner configure option
    
    * Put together all evolution-plugin stuff in configure.ac
    * Removed AC_DEFINE of HAVE_EVOLUTION_PLUGIN, as nowhere used
    * Enabled auto mode by default in --enable-evolution-miner
    * Merged USING_EVOLUTION_MINER and HAVE_EVOLUTION_PLUGIN AM_CONDITIONALs into
        a single USING_EVOLUTION_MINER
    * Issue configure error when --enable-evolution-miner=yes and evolution
        dependencies are not installed

 configure.ac            |  106 ++++++++++++++++++++++++-----------------------
 src/plugins/Makefile.am |    4 +-
 2 files changed, 55 insertions(+), 55 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a2de92e..5a3e67f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -821,16 +821,66 @@ fi
 AM_CONDITIONAL(HAVE_GNOME_KEYRING, test "x$have_gnome_keyring" = "xyes")
 
 ####################################################################
-# Mail miners
+# Miner Evolution
 ####################################################################
 
 AC_ARG_ENABLE([evolution_miner],
               AS_HELP_STRING([--enable-evolution-miner],
-                             [enable support for Evolution data miner [[default=yes]]]),,
-              [enable_evolution_miner=yes])
+                             [enable support for Evolution data miner [[default=auto]]]),,
+              [enable_evolution_miner=auto])
+
+if test "x$enable_evolution_miner" != "xno"; then
+   PKG_CHECK_MODULES(EVOLUTION_PLUGIN, [
+   		     evolution-plugin >= $EVO_REQUIRED
+		     evolution-data-server-1.2 >= $EDS_REQUIRED],
+		     have_evolution_plugin=yes,
+		     have_evolution_plugin=no)
+
+   PKG_CHECK_EXISTS([evolution-data-server-1.2 >= 2.29.1],
+		    [AC_DEFINE(HAVE_EDS_2_29_1, 1, [Define if we have eds 2.29.1 or newer])])
+
+   AC_SUBST(EVOLUTION_PLUGIN_CFLAGS)
+   AC_SUBST(EVOLUTION_PLUGIN_LIBS)
+
+   if test "x$have_evolution_plugin" = "xyes"; then
+      dnl Evolution plugin will be compiled
+      enable_evolution_miner=yes
+
+      dnl Evolution plugins dir
+      AC_ARG_WITH([evolution_plugins_dir],
+                  AS_HELP_STRING([--with-evolution-plugins-dir],
+	                         [Path to Evolution plugins directory]))
+      if test "x$with_evolution_plugins_dir" = "x" ; then
+         evolution_plugins_dir=`$PKG_CONFIG evolution-plugin --variable=plugindir`
+      else
+         evolution_plugins_dir="$with_evolution_plugins_dir"
+      fi
+
+      EVOLUTION_PLUGIN_INSTALL_DIR=$evolution_plugins_dir
+   else
+      if test "x$enable_evolution_miner" = "xyes"; then
+        dnl If evolution-miner was explicitly enabled by the user, and
+        dnl  evolution-plugin deps not found, dump error
+        AC_MSG_ERROR([Couldn't find Evolution plugin requirements (evolution-dev, evolution-data-server-dev).])
+      else
+        dnl support 'auto' mode...
+        enable_evolution_miner="no  (disabled)"
+        EVOLUTION_PLUGIN_INSTALL_DIR=/dev/null
+      fi
+   fi
+
+   AC_SUBST(EVOLUTION_PLUGIN_INSTALL_DIR)
+else
+   enable_evolution_miner="no  (disabled)"
+fi
 
 AM_CONDITIONAL(USING_EVOLUTION_MINER, test "x$enable_evolution_miner" = "xyes")
 
+
+####################################################################
+# Miner Kmail
+####################################################################
+
 AC_ARG_ENABLE([kmail_miner],
               AS_HELP_STRING([--enable-kmail-miner],
                              [enable support for KMail data miner [[default=yes]]]),,
@@ -838,6 +888,7 @@ AC_ARG_ENABLE([kmail_miner],
 
 AM_CONDITIONAL(USING_KMAIL_MINER, test "x$enable_kmail_miner" = "xyes")
 
+
 ##################################################################
 # Miner RSS
 ##################################################################
@@ -1457,55 +1508,6 @@ have_mockup="no  (disabled)"
 
 AM_CONDITIONAL(HAVE_MOCKUP, test "x$have_mockup" = "xyes")
 
-##################################################################
-# Enable Evolution plugin support?
-##################################################################
-
-if test "x$enable_evolution_miner" != "xno" ; then
-   PKG_CHECK_MODULES(EVOLUTION_PLUGIN, [
-   		     evolution-plugin >= $EVO_REQUIRED
-		     evolution-data-server-1.2 >= $EDS_REQUIRED],
-		     have_evolution_plugin=yes,
-		     have_evolution_plugin=no)
-
-   PKG_CHECK_EXISTS([evolution-data-server-1.2 >= 2.29.1],
-		    [AC_DEFINE(HAVE_EDS_2_29_1, 1, [Define if we have eds 2.29.1 or newer])])
-
-   AC_SUBST(EVOLUTION_PLUGIN_CFLAGS)
-   AC_SUBST(EVOLUTION_PLUGIN_LIBS)
-
-   if test x$have_evolution_plugin = "xyes"; then
-      dnl Evolution plugins dir
-      AC_ARG_WITH([evolution_plugins_dir],
-                  AS_HELP_STRING([--with-evolution-plugins-dir],
-	                         [Path to Evolution plugins directory]))
-      if test "x$with_evolution_plugins_dir" = "x" ; then
-         evolution_plugins_dir=`$PKG_CONFIG evolution-plugin --variable=plugindir`
-      else
-         evolution_plugins_dir="$with_evolution_plugins_dir"
-      fi
-
-      EVOLUTION_PLUGIN_INSTALL_DIR=$evolution_plugins_dir
-   else
-      EVOLUTION_PLUGIN_INSTALL_DIR=/dev/null
-   fi
-
-   AC_SUBST(EVOLUTION_PLUGIN_INSTALL_DIR)
-
-   if test "x$have_evolution_plugin" = "xyes"; then
-      AC_DEFINE(HAVE_EVOLUTION_PLUGIN, 1, [Define if we have Evolution plugin ])
-   fi
-else
-   have_evolution_plugin="no  (disabled)"
-fi
-
-if test "x$enable_evolution_plugin" = "xyes"; then
-   if test "x$have_evolution_plugin" != "xyes"; then
-      AC_MSG_ERROR([Couldn't find Evolution plugin requirements (evolution-dev, evolution-data-server-dev).])
-   fi
-fi
-
-AM_CONDITIONAL(HAVE_EVOLUTION_PLUGIN, test "$have_evolution_plugin" = "yes")
 
 ####################################################################
 # Enable Nautilus extension support?
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index a549966..fb96a68 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -1,16 +1,14 @@
 include $(top_srcdir)/Makefile.decl
 
-SUBDIRS = 
+SUBDIRS =
 
 if USING_KMAIL_MINER
 SUBDIRS += kmail
 endif
 
 if USING_EVOLUTION_MINER
-if HAVE_EVOLUTION_PLUGIN
 SUBDIRS += evolution
 endif
-endif
 
 if HAVE_NAUTILUS_EXTENSION
 SUBDIRS += nautilus



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