[evolution-activesync] autotools: fix --disable-camel-backend



commit e62eed9ac9f31f62a12939632d028392d56defce
Author: Patrick Ohly <patrick ohly intel com>
Date:   Fri Aug 26 05:22:22 2016 -0700

    autotools: fix --disable-camel-backend
    
    --disable-camel-backend is necessary to compile activesyncd on
    distros without the recent backend API. Such a reduced activesyncd
    is still useful for contact and calendar syncing.
    
    To fix the option, entering and thus compiling source directories which are
    only needed for the backend must be avoided when --disable-camel-backend is
    used. This broke when adapting the code to API changes in EDS.

 Makefile.am  |    4 ++--
 configure.ac |    5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 536e161..d0b893b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,7 +10,7 @@ if ENABLE_QT_CONFIG_TOOL
 endif
 
 if ENABLE_CAMEL_BACKEND
-  CAMEL_DIRS = libevoeas camel
+  CAMEL_DIRS = libevoeas camel collection configuration
 endif
 
 gsettings_SCHEMAS = org.meego.activesyncd.gschema.xml org.meego.activesyncd.account.gschema.xml
@@ -20,7 +20,7 @@ gsettings_SCHEMAS = org.meego.activesyncd.gschema.xml org.meego.activesyncd.acco
 # full set of directories for "make dist"
 DIST_SUBDIRS = . libeasaccount/src libeasclient libeasaccount/tests eas-daemon check_tests libevoeas camel 
meego QtActivesyncdConfig po collection configuration
 # subset of that list for "make && make install"
-SUBDIRS = . libeasaccount/src libeasclient eas-daemon check_tests $(CAMEL_DIRS) $(MEEGO_DIR) $(QTCONFIG_DIR) 
po collection configuration
+SUBDIRS = . libeasaccount/src libeasclient eas-daemon check_tests $(CAMEL_DIRS) $(MEEGO_DIR) $(QTCONFIG_DIR) 
po
 
 dist_noinst_DATA = $(gsettings_SCHEMAS)
 
diff --git a/configure.ac b/configure.ac
index 5d64562..86c0feb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,7 +63,7 @@ PKG_CHECK_MODULES(LIBICAL, libical)
 PKG_CHECK_MODULES(LIBEBOOK, libebook-1.2)
 PKG_CHECK_MODULES(LIBEBACKEND, libebackend-1.2)
 PKG_CHECK_MODULES(GIO, gio-2.0)
-PKG_CHECK_MODULES(LIBEMAIL_ENGINE, libemail-engine)
+PKG_CHECK_MODULES(LIBEMAIL_ENGINE, libemail-engine, [have_libemail_engine="yes"], 
[have_libemail_engine="no"])
 
 EVO_PKG="-3.0"
 CAMEL_PKG="camel-1.2"
@@ -141,6 +141,9 @@ AC_ARG_ENABLE(camel-backend,
                              [Can be used to disable compiling the libcamel email backend. Enabled by 
default.]),
               [enable_camel="$enableval"], [enable_camel="yes"])
 AM_CONDITIONAL([ENABLE_CAMEL_BACKEND], [test "$enable_camel" = "yes"])
+if test "$enable_camel" = "yes" && test "$have_libemail_engine" != "yes"; then
+    AC_MSG_ERROR(["libemail-engine.pc is required for the camel backend; use --disable-camel-backend when 
EDS is too old or install a more recent EDS"])
+fi
 
 AS_AC_EXPAND(LIBEXECDIR, $libexecdir)
 


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