diff --git a/CMakeLists.txt b/CMakeLists.txt
index f20472797080c3377721809ef75b84f3820b27b4..c57b776e8ae4223e50737ea269fc807410395a59 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,6 +79,8 @@ option(ENABLE_VCARD "Turn on compilation of vcard4 support." YES)
 option(ENABLE_VIDEO "Build with video support." YES)
 option(ENABLE_ASSETS "Package sound assets." YES)
 option(ENABLE_PACKAGE_SOURCE "Create 'package_source' target for source archive making (CMake >= 3.11)" OFF)
+option(ENABLE_SQLITE "Build with sqlite support" YES)
+option(ENABLE_XML2 "Build with libxml2 support - for presence feature mainly" YES)
 
 cmake_dependent_option(ENABLE_NOTIFY "Enable libnotify support." YES "ENABLE_GTK_UI;NOT APPLE" NO)
 cmake_dependent_option(ENABLE_ASSISTANT "Turn on assistant compiling." YES "ENABLE_GTK_UI" NO)
@@ -168,8 +170,15 @@ if(ENABLE_ZRTP)
 	endif()
 endif()
 
-find_package(Sqlite3 REQUIRED)
-find_package(XML2 REQUIRED)
+if(ENABLE_SQLITE)
+	find_package(Sqlite3 REQUIRED)
+	add_definitions(-DHAVE_SQLITE)
+endif()
+
+if (ENABLE_XML2)
+	find_package(XML2 REQUIRED)
+	add_definitions(-DHAVE_XML2)
+endif()
 
 if (ENABLE_DB_STORAGE)
 	if(NOT DISABLE_SOCI_PACKAGE_SEARCH)
@@ -296,8 +305,13 @@ if(ENABLE_TUNNEL)
 	list(APPEND LINPHONE_INCLUDE_DIRS ${TUNNEL_INCLUDE_DIRS})
 endif()
 
-list(APPEND LINPHONE_INCLUDE_DIRS ${XML2_INCLUDE_DIRS})
-list(APPEND LINPHONE_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIRS})
+if(ENABLE_XML2)
+	list(APPEND LINPHONE_INCLUDE_DIRS ${XML2_INCLUDE_DIRS})
+endif()
+
+if(ENABLE_SQLITE)
+	list(APPEND LINPHONE_INCLUDE_DIRS ${SQLITE3_INCLUDE_DIRS})
+endif()
 
 if(ZLIB_FOUND)
 	list(APPEND LINPHONE_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
@@ -422,7 +436,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY
 set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/config.h PROPERTIES GENERATED ON)
 add_definitions(-DHAVE_CONFIG_H)
 
-
 if(ENABLE_VIDEO)
 	add_definitions(-DVIDEO_ENABLED)
 endif()
diff --git a/coreapi/CMakeLists.txt b/coreapi/CMakeLists.txt
index 914a11d0ad1d52513d706d15c71869ea20f3f235..4032804f6453457940e2fd29325924f504ac9e35 100644
--- a/coreapi/CMakeLists.txt
+++ b/coreapi/CMakeLists.txt
@@ -43,7 +43,6 @@ set(LINPHONE_SOURCE_FILES_C
 	bellesip_sal/sal_sdp.c
 	buffer.c
 	callbacks.c
-	carddav.c
 	chat.c
 	contactprovider.c
 	ec-calibrator.c
@@ -63,7 +62,6 @@ set(LINPHONE_SOURCE_FILES_C
 	linphone_tunnel_config.c
 	localplayer.c
 	logging.c
-	lpc2xml.c
 	lpconfig.c
 	lsd.c
 	misc.c
@@ -76,13 +74,10 @@ set(LINPHONE_SOURCE_FILES_C
 	ringtoneplayer.c
 	siplogin.c
 	sipsetup.c
-	sqlite3_bctbx_vfs.c
 	update_check.c
 	video_definition.c
-	xml2lpc.c
-	xml.c
-	xmlrpc.c
 	vtables.c
+	xmlrpc.c
 )
 set(LINPHONE_SOURCE_FILES_CXX
 	conference.cc
@@ -100,6 +95,13 @@ if (IOS)
 	list(APPEND LINPHONE_SOURCE_FILES_CXX linphonecore_ios.cc)
 endif()
 
+if(ENABLE_XML2)
+	list(APPEND LINPHONE_SOURCE_FILES_C lpc2xml.c xml2lpc.c xml.c)
+endif()
+
+if(ENABLE_SQLITE)
+	list(APPEND LINPHONE_SOURCE_FILES_C sqlite3_bctbx_vfs.c)
+endif()
 
 if(ENABLE_TUNNEL)
 	list(APPEND LINPHONE_SOURCE_FILES_CXX
@@ -113,6 +115,7 @@ endif()
 
 if(BELCARD_FOUND)
 	list(APPEND LINPHONE_SOURCE_FILES_CXX vcard.cc)
+	list(APPEND LINPHONE_SOURCE_FILES_C carddav.c)
 else()
 	list(APPEND LINPHONE_SOURCE_FILES_C vcard_stubs.c)
 endif()
diff --git a/coreapi/chat.c b/coreapi/chat.c
index 010b03272d59593457444d89e6333ebb3d47a34f..706ea92ffd8824dcb4cd9ad954ebc928a948c49d 100644
--- a/coreapi/chat.c
+++ b/coreapi/chat.c
@@ -19,10 +19,6 @@
  */
 
 
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-#include <libxml/xmlwriter.h>
-
 #include <linphone/utils/utils.h>
 
 #include "linphone/core.h"
diff --git a/coreapi/friend.c b/coreapi/friend.c
index ef5295260ca425fbe38a1c29a988aa943c7f3cc0..b04dd37ca88b18d7a2ebe67714e87aff6a0e4cc3 100644
--- a/coreapi/friend.c
+++ b/coreapi/friend.c
@@ -1367,10 +1367,47 @@ BELLE_SIP_INSTANCIATE_VPTR(LinphoneFriend, belle_sip_object_t,
 	FALSE
 );
 
+void linphone_friend_add_addresses_and_numbers_into_maps(LinphoneFriend *lf, LinphoneFriendList *list) {
+	bctbx_list_t *iterator;
+	bctbx_list_t *phone_numbers;
+	const bctbx_list_t *addresses;
+
+	if (lf->refkey) {
+		bctbx_pair_t *pair = (bctbx_pair_t*) bctbx_pair_cchar_new(lf->refkey, linphone_friend_ref(lf));
+		bctbx_map_cchar_insert_and_delete(list->friends_map, pair);
+	}
+
+	phone_numbers = linphone_friend_get_phone_numbers(lf);
+	iterator = phone_numbers;
+	while (iterator) {
+		const char *number = (const char *)bctbx_list_get_data(iterator);
+		const char *uri = linphone_friend_phone_number_to_sip_uri(lf, number);
+		if (uri) {
+			add_friend_to_list_map_if_not_in_it_yet(lf, uri);
+		}
+		iterator = bctbx_list_next(iterator);
+	}
+	bctbx_list_free(phone_numbers);
+
+	addresses = linphone_friend_get_addresses(lf);
+	iterator = (bctbx_list_t *)addresses;
+	while (iterator) {
+		LinphoneAddress *lfaddr = (LinphoneAddress *)bctbx_list_get_data(iterator);
+		char *uri = linphone_address_as_string_uri_only(lfaddr);
+		if (uri) {
+			add_friend_to_list_map_if_not_in_it_yet(lf, uri);
+			ms_free(uri);
+		}
+		iterator = bctbx_list_next(iterator);
+	}
+}
+
 /*******************************************************************************
  * SQL storage related functions                                               *
  ******************************************************************************/
 
+#ifdef HAVE_SQLITE
+
 static void linphone_create_friends_table(sqlite3* db) {
 	char* errmsg = NULL;
 	int ret;
@@ -1770,41 +1807,6 @@ void linphone_core_remove_friends_list_from_db(LinphoneCore *lc, LinphoneFriendL
 	}
 }
 
-void linphone_friend_add_addresses_and_numbers_into_maps(LinphoneFriend *lf, LinphoneFriendList *list) {
-	bctbx_list_t *iterator;
-	bctbx_list_t *phone_numbers;
-	const bctbx_list_t *addresses;
-
-	if (lf->refkey) {
-		bctbx_pair_t *pair = (bctbx_pair_t*) bctbx_pair_cchar_new(lf->refkey, linphone_friend_ref(lf));
-		bctbx_map_cchar_insert_and_delete(list->friends_map, pair);
-	}
-
-	phone_numbers = linphone_friend_get_phone_numbers(lf);
-	iterator = phone_numbers;
-	while (iterator) {
-		const char *number = (const char *)bctbx_list_get_data(iterator);
-		const char *uri = linphone_friend_phone_number_to_sip_uri(lf, number);
-		if (uri) {
-			add_friend_to_list_map_if_not_in_it_yet(lf, uri);
-		}
-		iterator = bctbx_list_next(iterator);
-	}
-	bctbx_list_free(phone_numbers);
-
-	addresses = linphone_friend_get_addresses(lf);
-	iterator = (bctbx_list_t *)addresses;
-	while (iterator) {
-		LinphoneAddress *lfaddr = (LinphoneAddress *)bctbx_list_get_data(iterator);
-		char *uri = linphone_address_as_string_uri_only(lfaddr);
-		if (uri) {
-			add_friend_to_list_map_if_not_in_it_yet(lf, uri);
-			ms_free(uri);
-		}
-		iterator = bctbx_list_next(iterator);
-	}
-}
-
 bctbx_list_t* linphone_core_fetch_friends_from_db(LinphoneCore *lc, LinphoneFriendList *list) {
 	char *buf;
 	uint64_t begin,end;
@@ -1875,6 +1877,27 @@ bctbx_list_t* linphone_core_fetch_friends_lists_from_db(LinphoneCore *lc) {
 	return result;
 }
 
+#else
+void linphone_core_store_friends_list_in_db(LinphoneCore *lc, LinphoneFriendList *list){
+	ms_warning("linphone_core_store_friends_list_in_db(): stubbed");
+}
+
+void linphone_core_friends_storage_init(LinphoneCore *lc){
+}
+
+void linphone_core_friends_storage_close(LinphoneCore *lc){
+}
+
+void linphone_core_store_friend_in_db(LinphoneCore *lc, LinphoneFriend *lf){
+	ms_warning("linphone_core_store_friend_in_db(): stubbed");
+}
+
+void linphone_core_remove_friends_list_from_db(LinphoneCore *lc, LinphoneFriendList *list){
+	ms_warning("linphone_core_store_friend_in_db(): stubbed");
+}
+
+#endif /* HAVE_SQLITE */
+
 void linphone_core_set_friends_database_path(LinphoneCore *lc, const char *path) {
 	if (!linphone_core_conference_server_enabled(lc) && L_GET_PRIVATE(lc->cppPtr)->mainDb)
 		L_GET_PRIVATE(lc->cppPtr)->mainDb->import(LinphonePrivate::MainDb::Sqlite3, path);
@@ -2120,4 +2143,4 @@ const char * linphone_friend_get_organization(const LinphoneFriend *lf) {
 		return linphone_vcard_get_organization(lf->vcard);
 	}
 	return NULL;
-}
\ No newline at end of file
+}
diff --git a/coreapi/friendlist.c b/coreapi/friendlist.c
index 9d74025be8629713e967eb5e1b91ee7ca758a7f3..9da7bec5a2ee7331a2e01fd5676c369dbf16031b 100644
--- a/coreapi/friendlist.c
+++ b/coreapi/friendlist.c
@@ -142,6 +142,11 @@ void linphone_friend_list_cbs_set_presence_received(LinphoneFriendListCbs *cbs,
 	cbs->presence_received_cb = cb;
 }
 
+
+#ifdef HAVE_XML2
+
+static void carddav_done(LinphoneCardDavContext *cdc, bool_t success, const char *msg);
+
 static int add_uri_entry(xmlTextWriterPtr writer, int err, const char *uri) {
 	if (err >= 0) {
 		err = xmlTextWriterStartElement(writer, (const xmlChar *)"entry");
@@ -469,6 +474,22 @@ end:
 	linphone_xmlparsing_context_destroy(xml_ctx);
 }
 
+#else /* HAVE_XML2 */
+
+/* stubs */
+static void linphone_friend_list_parse_multipart_related_body(LinphoneFriendList *list, const LinphoneContent *body,
+															  const char *first_part_body){
+	ms_warning("linphone_friend_list_parse_multipart_related_body() is stubbed.");
+}
+
+static char *create_resource_list_xml(const LinphoneFriendList *list){
+	ms_warning("create_resource_list_xml() is stubbed.");
+	return NULL;
+}
+
+#endif
+
+
 static bool_t linphone_friend_list_has_subscribe_inactive(const LinphoneFriendList *list) {
 	if (list->bodyless_subscription)
 		return TRUE;
@@ -739,16 +760,6 @@ LinphoneFriendListStatus linphone_friend_list_import_friend(LinphoneFriendList *
 	return LinphoneFriendListOK;
 }
 
-static void carddav_done(LinphoneCardDavContext *cdc, bool_t success, const char *msg) {
-	LinphoneFriendList *list = cdc->friend_list;
-	if (cdc && cdc->friend_list->cbs && cdc->friend_list->cbs->sync_state_changed_cb) {
-		cdc->friend_list->cbs->sync_state_changed_cb(
-			cdc->friend_list, success ? LinphoneFriendListSyncSuccessful : LinphoneFriendListSyncFailure, msg);
-	}
-	NOTIFY_IF_EXIST(SyncStateChanged, sync_status_changed, list,
-					success ? LinphoneFriendListSyncSuccessful : LinphoneFriendListSyncFailure, msg)
-	linphone_carddav_context_destroy(cdc);
-}
 
 static LinphoneFriendListStatus _linphone_friend_list_remove_friend(LinphoneFriendList *list, LinphoneFriend *lf,
 																	bool_t remove_from_server) {
@@ -759,6 +770,8 @@ static LinphoneFriendListStatus _linphone_friend_list_remove_friend(LinphoneFrie
 	if (elem == NULL)
 		return LinphoneFriendListNonExistentFriend;
 
+#if defined(HAVE_SQLITE) && defined(VCARD_ENABLED)
+
 	if (lf && lf->lc && lf->lc->friends_db) {
 		linphone_core_remove_friend_from_db(lf->lc, lf);
 	}
@@ -777,6 +790,7 @@ static LinphoneFriendListStatus _linphone_friend_list_remove_friend(LinphoneFrie
 			}
 		}
 	}
+#endif
 	list->friends = bctbx_list_erase_link(list->friends, elem);
 	if (lf->refkey) {
 		bctbx_iterator_t *it = bctbx_map_cchar_find_key(list->friends_map, lf->refkey);
@@ -848,6 +862,19 @@ const bctbx_list_t *linphone_friend_list_get_friends(const LinphoneFriendList *l
 	return list->friends;
 }
 
+#if defined(HAVE_SQLITE) && defined(VCARD_ENABLED)
+
+static void carddav_done(LinphoneCardDavContext *cdc, bool_t success, const char *msg) {
+	LinphoneFriendList *list = cdc->friend_list;
+	if (cdc && cdc->friend_list->cbs && cdc->friend_list->cbs->sync_state_changed_cb) {
+		cdc->friend_list->cbs->sync_state_changed_cb(
+			cdc->friend_list, success ? LinphoneFriendListSyncSuccessful : LinphoneFriendListSyncFailure, msg);
+	}
+	NOTIFY_IF_EXIST(SyncStateChanged, sync_status_changed, list,
+					success ? LinphoneFriendListSyncSuccessful : LinphoneFriendListSyncFailure, msg)
+	linphone_carddav_context_destroy(cdc);
+}
+
 void linphone_friend_list_update_dirty_friends(LinphoneFriendList *list) {
 	bctbx_list_t *dirty_friends = list->dirty_friends_to_update;
 
@@ -1045,6 +1072,18 @@ void linphone_friend_list_synchronize_friends_from_server(LinphoneFriendList *li
 	}
 }
 
+#else
+
+void linphone_friend_list_update_dirty_friends(LinphoneFriendList *list){
+	ms_warning("linphone_friend_list_update_dirty_friends(): stubbed.");
+}
+
+void linphone_friend_list_synchronize_friends_from_server(LinphoneFriendList *list){
+	ms_warning("linphone_friend_list_synchronize_friends_from_server(): stubbed.");
+}
+
+#endif
+
 LinphoneFriend *linphone_friend_list_find_friend_by_address(const LinphoneFriendList *list,
 															const LinphoneAddress *address) {
 	LinphoneAddress *clean_addr = linphone_address_clone(address);
diff --git a/coreapi/lime.c b/coreapi/lime.c
index 29f0a98d527ebad4167b6ee7460448e436f389c2..b23704e1ae8b0db9b480433c10ce1c4b46ccb73f 100644
--- a/coreapi/lime.c
+++ b/coreapi/lime.c
@@ -18,19 +18,24 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "linphone/api/c-content.h"
-
-#include "bctoolbox/crypto.h"
-#include "lime.h"
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+
+#include "linphone/api/c-content.h"
+#include "bctoolbox/crypto.h"
+#include "lime.h"
+
+
 #ifdef HAVE_LIME
+
 #include "private.h"
 #include "bctoolbox/port.h"
 #include "bzrtp/bzrtp.h"
 
+
+
 #define FILE_TRANSFER_KEY_SIZE 32
 
 /**
diff --git a/coreapi/lime.h b/coreapi/lime.h
index b2a2eda80fc28280c6f91b00ef0763a517b3952e..1685e648cfdb138c302d72f05af71b2a0da46a3b 100644
--- a/coreapi/lime.h
+++ b/coreapi/lime.h
@@ -36,9 +36,6 @@
 #define LIME_SENDER	0x01
 #define LIME_RECEIVER 0x02
 #include <stdint.h>
-#include <libxml/tree.h>
-#include <libxml/parser.h>
-#include <libxml/xmlwriter.h>
 
 #include "linphone/core.h"
 #include <mediastreamer2/mscommon.h>
diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c
index 268ea93d3ab1bd0ed43e44da8eefc99ccf4894ce..45f5ff32fe4e22e5c0435cb4d66b1d388f84e686 100644
--- a/coreapi/linphonecore.c
+++ b/coreapi/linphonecore.c
@@ -35,7 +35,10 @@
 #include "lime.h"
 #include "conference_private.h"
 #include "logger/logger.h"
+
+#ifdef HAVE_SQLITE
 #include "sqlite3_bctbx_vfs.h"
+#endif
 
 #include "chat/modifier/file-transfer-chat-message-modifier.h"
 #include "content/file-transfer-content.h"
@@ -7896,6 +7899,8 @@ void linphone_core_remove_iterate_hook(LinphoneCore *lc, LinphoneCoreIterateHook
 // TODO: Remove me later, code found in message_storage.c.
 // =============================================================================
 
+#ifdef HAVE_SQLITE
+
 int _linphone_sqlite3_open(const char *db_file, sqlite3 **db) {
 	char* errmsg = NULL;
 	int ret;
@@ -7926,6 +7931,8 @@ int _linphone_sqlite3_open(const char *db_file, sqlite3 **db) {
 	return ret;
 }
 
+#endif
+
 // =============================================================================
 //migration code remove in april 2019, 2 years after switching from xml based zrtp cache to sqlite
 void linphone_core_set_zrtp_secrets_file(LinphoneCore *lc, const char* file){
@@ -7974,15 +7981,18 @@ LinphoneZrtpPeerStatus linphone_core_get_zrtp_status(LinphoneCore *lc, const cha
 }
 
 static void linphone_core_zrtp_cache_close(LinphoneCore *lc) {
+#ifdef HAVE_SQLITE
 	if (lc->zrtp_cache_db) {
 		sqlite3_close(lc->zrtp_cache_db);
 		bctbx_mutex_destroy(&(lc->zrtp_cache_db_mutex));
 		lc->zrtp_cache_db = NULL;
 	}
+#endif
 }
 
 
 void linphone_core_zrtp_cache_db_init(LinphoneCore *lc, const char *fileName) {
+#ifdef HAVE_SQLITE
 	int ret;
 	const char *errmsg;
 	const char *backupExtension = "_backup";
@@ -8023,6 +8033,9 @@ void linphone_core_zrtp_cache_db_init(LinphoneCore *lc, const char *fileName) {
 	lc->zrtp_cache_db = db;
 end:
 	if (backupName) bctbx_free(backupName);
+#else
+	ms_warning("linphone_core_zrtp_cache_db_init(): stubbed.");
+#endif
 }
 
 void linphone_core_set_user_certificates_path (LinphoneCore *lc, const char *path) {
diff --git a/coreapi/lpconfig.c b/coreapi/lpconfig.c
index 5a69f198a034c5ce5b08668a957fcf66545b7b81..e85e63fea66597f8f1677b763e3bb4558a4cc931 100644
--- a/coreapi/lpconfig.c
+++ b/coreapi/lpconfig.c
@@ -535,9 +535,11 @@ LinphoneStatus linphone_config_read_file(LpConfig *lpconfig, const char *filenam
 	return -1;
 }
 
+#ifdef HAVE_XML2
+
+static const char *empty_xml = "empty provisioning file";
 static const char *xml_to_lpc_failed = "xml to lpc failed";
 static const char *invalid_xml = "invalid xml";
-static const char *empty_xml = "empty provisioning file";
 
 static const char* _linphone_config_xml_convert(LpConfig *lpc, xml2lpc_context *context, int result) {
 	const char* error_msg = NULL;
@@ -585,9 +587,19 @@ static void xml2lpc_callback(void *ctx, xml2lpc_log_level level, const char *fmt
 	bctbx_logv(BCTBX_LOG_DOMAIN, bctbx_level,fmt,list);
 }
 
+#else
+
+const char* linphone_config_load_from_xml_file(LinphoneConfig *lpc, const char *filename) {
+	ms_warning("linphone_config_load_from_xml_file(): stubbed.");
+	return "No libxml2 support";
+}
+
+#endif
+
 const char* _linphone_config_load_from_xml_string(LpConfig *lpc, const char *buffer) {
-	xml2lpc_context *context = NULL;
 	const char* error_msg = NULL;
+#ifdef HAVE_XML2
+	xml2lpc_context *context = NULL;
 
 	if (buffer != NULL) {
 		context = xml2lpc_context_new(xml2lpc_callback, NULL);
@@ -596,6 +608,10 @@ const char* _linphone_config_load_from_xml_string(LpConfig *lpc, const char *buf
 		error_msg = empty_xml;
 	}
 	if (context) xml2lpc_context_destroy(context);
+#else
+	error_msg = "No libxml2 support";
+	ms_warning("_linphone_config_load_from_xml_string(): stubbed.");
+#endif
 	return error_msg;
 }
 
@@ -1235,13 +1251,15 @@ bctbx_list_t * linphone_config_get_keys_names_list(LinphoneConfig *lpconfig, con
 }
 
 char* linphone_config_dump_as_xml(const LpConfig *lpconfig) {
-	char *buffer;
-
+	char *buffer = NULL;
+#ifdef HAVE_XML2
 	lpc2xml_context *ctx = lpc2xml_context_new(NULL, NULL);
 	lpc2xml_set_lpc(ctx, lpconfig);
 	lpc2xml_convert_string(ctx, &buffer);
 	lpc2xml_context_destroy(ctx);
-
+#else
+	ms_warning("linphone_config_dump_as_xml(): stubbed.");
+#endif
 	return buffer;
 }
 
diff --git a/coreapi/misc.c b/coreapi/misc.c
index 79d991f42a8b3faa4c6584779b52c02fb1bc7a44..2820531a56bcd692664cfee89757fe3a165fbbea 100644
--- a/coreapi/misc.c
+++ b/coreapi/misc.c
@@ -65,6 +65,22 @@
 #include "call/call.h"
 #include "call/call-log.h"
 
+char * linphone_timestamp_to_rfc3339_string(time_t timestamp) {
+	struct tm *ret;
+#ifndef _WIN32
+	struct tm gmt;
+	ret = gmtime_r(&timestamp,&gmt);
+#else
+	ret = gmtime(&timestamp);
+#endif
+	int n = snprintf(0, 0, "%4d-%02d-%02dT%02d:%02d:%02dZ",
+		 ret->tm_year + 1900, ret->tm_mon + 1, ret->tm_mday, ret->tm_hour, ret->tm_min, ret->tm_sec);
+	char *timestamp_str = (char *) ms_malloc(size_t(n + 1));
+	snprintf(timestamp_str, (size_t)n + 1, "%4d-%02d-%02dT%02d:%02d:%02dZ",
+		 ret->tm_year + 1900, ret->tm_mon + 1, ret->tm_mday, ret->tm_hour, ret->tm_min, ret->tm_sec);
+	return timestamp_str;
+}
+
 void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc){
 	const bctbx_list_t *elem;
 	int maxbw=LinphonePrivate::PayloadTypeHandler::getMinBandwidth(linphone_core_get_download_bandwidth(lc),
diff --git a/coreapi/presence.c b/coreapi/presence.c
index fa3b7d380bf8a28f38775e372230ae2f3abf7907..bb640ad389e0bc395e8342d701ef71a4b126feef 100644
--- a/coreapi/presence.c
+++ b/coreapi/presence.c
@@ -115,8 +115,6 @@ BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphonePresenceModel);
 BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphonePresenceModel);
 
 
-static const char *person_prefix = "/pidf:presence/dm:person";
-
 
 /*****************************************************************************
  * PRIVATE FUNCTIONS                                                         *
@@ -178,10 +176,6 @@ static void presence_service_unref(void *service) {
 	linphone_presence_service_unref((LinphonePresenceService *)service);
 }
 
-static void presence_service_set_timestamp(LinphonePresenceService *service, time_t timestamp) {
-	service->timestamp = timestamp;
-}
-
 static void presence_service_add_note(LinphonePresenceService *service, LinphonePresenceNote *note) {
 	service->notes = bctbx_list_append(service->notes, note);
 }
@@ -196,6 +190,12 @@ static void presence_activity_unref(void *activity) {
 	linphone_presence_activity_unref((LinphonePresenceActivity *)activity);
 }
 
+#ifdef HAVE_XML2
+
+static void presence_service_set_timestamp(LinphonePresenceService *service, time_t timestamp) {
+	service->timestamp = timestamp;
+}
+
 static time_t parse_timestamp(const char *timestamp) {
 	struct tm ret;
 	time_t seconds;
@@ -224,22 +224,20 @@ static time_t parse_timestamp(const char *timestamp) {
 	return seconds - (time_t)adjust_timezone;
 }
 
-char * linphone_timestamp_to_rfc3339_string(time_t timestamp) {
-	struct tm *ret;
-#ifndef _WIN32
-	struct tm gmt;
-	ret = gmtime_r(&timestamp,&gmt);
-#else
-	ret = gmtime(&timestamp);
-#endif
-	int n = snprintf(0, 0, "%4d-%02d-%02dT%02d:%02d:%02dZ",
-		 ret->tm_year + 1900, ret->tm_mon + 1, ret->tm_mday, ret->tm_hour, ret->tm_min, ret->tm_sec);
-	char *timestamp_str = (char *) ms_malloc(size_t(n + 1));
-	snprintf(timestamp_str, (size_t)n + 1, "%4d-%02d-%02dT%02d:%02d:%02dZ",
-		 ret->tm_year + 1900, ret->tm_mon + 1, ret->tm_mday, ret->tm_hour, ret->tm_min, ret->tm_sec);
-	return timestamp_str;
+static void presence_person_add_activities_note(LinphonePresencePerson *person, LinphonePresenceNote *note) {
+	person->activities_notes = bctbx_list_append(person->activities_notes, note);
 }
 
+static void presence_model_add_note(LinphonePresenceModel *model, LinphonePresenceNote *note) {
+	model->notes = bctbx_list_append(model->notes, note);
+}
+
+static void presence_person_add_note(LinphonePresencePerson *person, LinphonePresenceNote *note) {
+	person->notes = bctbx_list_append(person->notes, note);
+}
+
+#endif
+
 static LinphonePresencePerson * presence_person_new(const char *id,  time_t timestamp) {
 	LinphonePresencePerson *person = belle_sip_object_new(LinphonePresencePerson);
 	if (id != NULL) {
@@ -268,13 +266,6 @@ static void presence_person_unref(void *person) {
 	linphone_presence_person_unref((LinphonePresencePerson *)person);
 }
 
-static void presence_person_add_activities_note(LinphonePresencePerson *person, LinphonePresenceNote *note) {
-	person->activities_notes = bctbx_list_append(person->activities_notes, note);
-}
-
-static void presence_person_add_note(LinphonePresencePerson *person, LinphonePresenceNote *note) {
-	person->notes = bctbx_list_append(person->notes, note);
-}
 
 static int presence_model_insert_person_by_timestamp(LinphonePresencePerson *current, LinphonePresencePerson *to_insert) {
 	return current->timestamp < to_insert->timestamp;
@@ -284,10 +275,6 @@ static void presence_model_add_person(LinphonePresenceModel *model, LinphonePres
 	model->persons = bctbx_list_insert_sorted(model->persons, linphone_presence_person_ref(person), (bctbx_compare_func)presence_model_insert_person_by_timestamp);
 }
 
-static void presence_model_add_note(LinphonePresenceModel *model, LinphonePresenceNote *note) {
-	model->notes = bctbx_list_append(model->notes, note);
-}
-
 static void presence_model_find_open_basic_status(LinphonePresenceService *service, LinphonePresenceBasicStatus *status) {
 	if (service->status == LinphonePresenceBasicStatusOpen) {
 		*status = LinphonePresenceBasicStatusOpen;
@@ -1071,6 +1058,7 @@ static struct _presence_activity_name_map activity_map[] = {
 	{ "worship", LinphonePresenceActivityWorship }
 };
 
+#ifdef HAVE_XML2
 static int activity_name_to_presence_activity_type(const char *name, LinphonePresenceActivityType *acttype) {
 	unsigned int i;
 	for (i = 0; i < (sizeof(activity_map) / sizeof(activity_map[0])); i++) {
@@ -1081,6 +1069,7 @@ static int activity_name_to_presence_activity_type(const char *name, LinphonePre
 	}
 	return -1;
 }
+#endif
 
 static const char * presence_activity_type_to_string(LinphonePresenceActivityType acttype) {
 	unsigned int i;
@@ -1307,6 +1296,14 @@ float linphone_presence_model_get_capability_version(const LinphonePresenceModel
 	return version;
 }
 
+bool_t linphone_presence_model_is_online(const LinphonePresenceModel *model) {
+	if ((model->is_online == TRUE)
+		|| ((linphone_presence_model_get_basic_status(model) == LinphonePresenceBasicStatusOpen)
+			&& (linphone_presence_model_get_nb_activities(model) == 0)))
+		return TRUE;
+	return FALSE;
+}
+
 LinphonePresenceService * linphone_presence_service_ref(LinphonePresenceService *service) {
 	return (LinphonePresenceService *)belle_sip_object_ref(service);
 }
@@ -1385,7 +1382,10 @@ void * linphone_presence_note_get_user_data(const LinphonePresenceNote *note) {
  * XML PRESENCE INTERNAL HANDLING                                            *
  ****************************************************************************/
 
+#ifdef HAVE_XML2
+
 static const char *service_prefix = "/pidf:presence/pidf:tuple";
+static const char *person_prefix = "/pidf:presence/dm:person";
 
 static int process_pidf_xml_presence_service_notes(xmlparsing_context_t *xml_ctx, LinphonePresenceService *service, unsigned int service_idx) {
 	char xpath_str[MAX_XPATH_LENGTH];
@@ -1712,6 +1712,7 @@ static LinphonePresenceModel * process_pidf_xml_presence_notification(xmlparsing
 	return model;
 }
 
+#endif
 
 
 
@@ -1804,6 +1805,8 @@ void linphone_subscription_new(LinphoneCore *lc, SalSubscribeOp *op, const char
 	ms_free(tmp);
 }
 
+#ifdef HAVE_XML2
+
 void linphone_notify_parse_presence(const char *content_type, const char *content_subtype, const char *body, SalPresenceModel **result) {
 	xmlparsing_context_t *xml_ctx;
 	LinphonePresenceModel *model = NULL;
@@ -2036,14 +2039,6 @@ static void write_xml_presence_person_obj(LinphonePresencePerson *person, struct
 	if (err < 0) *st->err = err;
 }
 
-bool_t linphone_presence_model_is_online(const LinphonePresenceModel *model) {
-	if ((model->is_online == TRUE)
-		|| ((linphone_presence_model_get_basic_status(model) == LinphonePresenceBasicStatusOpen)
-			&& (linphone_presence_model_get_nb_activities(model) == 0)))
-		return TRUE;
-	return FALSE;
-}
-
 char *linphone_presence_model_to_xml(LinphonePresenceModel *model) {
 	xmlBufferPtr buf = NULL;
 	xmlTextWriterPtr writer = NULL;
@@ -2133,6 +2128,20 @@ end:
 	return content;
 }
 
+#else
+
+char *linphone_presence_model_to_xml(LinphonePresenceModel *model){
+	ms_warning("linphone_presence_model_to_xml(): stubbed.");
+	return NULL;
+}
+
+void linphone_notify_parse_presence(const char *content_type, const char *content_subtype, const char *body, SalPresenceModel **result){
+	if (result) *result = NULL;
+	ms_warning("linphone_notify_parse_presence(): stubbed.");
+}
+
+#endif
+
 void linphone_notify_recv(LinphoneCore *lc, SalOp *op, SalSubscribeStatus ss, SalPresenceModel *model){
 	char *tmp;
 	LinphoneFriend *lf = NULL;
diff --git a/coreapi/private.h b/coreapi/private.h
index ea296174104f3cdec13e038c8fa4091503df6821..a296f0744002a60677e5008c0dee8d33c1388857 100644
--- a/coreapi/private.h
+++ b/coreapi/private.h
@@ -128,8 +128,9 @@
 #endif
 #endif
 
-
+#ifdef HAVE_SQLITE
 #include <sqlite3.h>
+#endif
 
 #include "private_structs.h"
 #include "private_functions.h"
diff --git a/coreapi/private_functions.h b/coreapi/private_functions.h
index d9ec43752deb44d81b92a2a1a7c184c5ae6afc2f..ad30f5ce96ac9ca52db23ee2ce2b71af0519a8a8 100644
--- a/coreapi/private_functions.h
+++ b/coreapi/private_functions.h
@@ -21,10 +21,12 @@
 #ifndef _PRIVATE_FUNCTIONS_H_
 #define _PRIVATE_FUNCTIONS_H_
 
+#ifdef HAVE_XML2
 #include <libxml/xmlreader.h>
 #include <libxml/xmlwriter.h>
 #include <libxml/xpath.h>
 #include <libxml/xpathInternals.h>
+#endif
 
 #include <mediastreamer2/msconference.h>
 
@@ -483,7 +485,9 @@ LinphoneCore *_linphone_core_new_shared_with_config(LinphoneCoreCbs *cbs, struct
 int linphone_upnp_init(LinphoneCore *lc);
 void linphone_upnp_destroy(LinphoneCore *lc);
 
+#ifdef HAVE_SQLITE
 int _linphone_sqlite3_open(const char *db_file, sqlite3 **db);
+#endif
 
 LinphoneChatMessageStateChangedCb linphone_chat_message_get_message_state_changed_cb(LinphoneChatMessage* msg);
 void linphone_chat_message_set_message_state_changed_cb(LinphoneChatMessage* msg, LinphoneChatMessageStateChangedCb cb);
@@ -564,6 +568,7 @@ void linphone_player_set_current_callbacks(LinphonePlayer *player, LinphonePlaye
  * XML UTILITY FUNCTIONS                                                     *
  ****************************************************************************/
 
+#ifdef HAVE_XML2
 xmlparsing_context_t * linphone_xmlparsing_context_new(void);
 void linphone_xmlparsing_context_destroy(xmlparsing_context_t *ctx);
 void linphone_xmlparsing_genericxml_error(void *ctx, const char *fmt, ...);
@@ -574,7 +579,7 @@ char * linphone_get_xml_attribute_text_content(xmlparsing_context_t *xml_ctx, co
 void linphone_free_xml_text_content(char *text);
 xmlXPathObjectPtr linphone_get_xml_xpath_object_for_node_list(xmlparsing_context_t *xml_ctx, const char *xpath_expression);
 void linphone_xml_xpath_context_init_carddav_ns(xmlparsing_context_t *xml_ctx);
-
+#endif
 /*****************************************************************************
  * OTHER UTILITY FUNCTIONS                                                     *
  ****************************************************************************/
diff --git a/coreapi/private_structs.h b/coreapi/private_structs.h
index 5b9b6bf8034048c056abbcbdb3fd94262e664660..48f3d232d7779bab5acca5f5c0f2d167e4bf353a 100644
--- a/coreapi/private_structs.h
+++ b/coreapi/private_structs.h
@@ -22,10 +22,17 @@
 #define _PRIVATE_STRUCTS_H_
 
 #include <bctoolbox/map.h>
+
+#ifdef HAVE_XML2
 #include <libxml/xmlreader.h>
 #include <libxml/xmlwriter.h>
 #include <libxml/xpath.h>
 #include <libxml/xpathInternals.h>
+#endif
+
+#ifndef HAVE_SQLITE
+typedef struct _sqlite3 sqlite3;
+#endif
 
 #include "carddav.h"
 #include "sal/register-op.h"
@@ -539,6 +546,7 @@ BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphonePlayer);
 /*****************************************************************************
  * XML UTILITY FUNCTIONS                                                     *
  ****************************************************************************/
+#ifdef HAVE_XML2
 
 #define XMLPARSING_BUFFER_LEN 2048
 #define MAX_XPATH_LENGTH 256
@@ -550,6 +558,7 @@ struct _xmlparsing_context {
 	char warningBuffer[XMLPARSING_BUFFER_LEN];
 };
 
+#endif
 
 /*****************************************************************************
  * OTHER UTILITY FUNCTIONS                                                     *
diff --git a/coreapi/tester_utils.h b/coreapi/tester_utils.h
index f6ec6c7c1f0991aadd7ff3e3fb036495bf23d5e7..21e7601f13e46e78e8e6a5d81ff5068309245c3e 100644
--- a/coreapi/tester_utils.h
+++ b/coreapi/tester_utils.h
@@ -21,7 +21,11 @@
 #ifndef _TESTER_UTILS_H_
 #define _TESTER_UTILS_H_
 
-#include <sqlite3.h>
+#ifdef HAVE_SQLITE
+	#include <sqlite3.h>
+#else
+	typedef struct _sqlite3 sqlite3;
+#endif
 
 #include "account_creator/private.h"
 #include "linphone/core.h"
diff --git a/coreapi/xml.c b/coreapi/xml.c
index 44e09c8b3736416cf07a0b2ea219a7c9eec13dd8..7c92eb00b2b1ece6d5e21361d0ebbc2dd4be0c0f 100644
--- a/coreapi/xml.c
+++ b/coreapi/xml.c
@@ -18,7 +18,6 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
-
 #include "private.h"
 
 #include <libxml/xmlreader.h>
@@ -137,3 +136,5 @@ void linphone_xml_xpath_context_init_carddav_ns(xmlparsing_context_t *xml_ctx) {
 		xmlXPathRegisterNs(xml_ctx->xpath_ctx, (const xmlChar*)"x1", (const xmlChar*)"http://calendarserver.org/ns/");
 	}
 }
+
+
diff --git a/coreapi/xmlrpc.c b/coreapi/xmlrpc.c
index 49b74dac77abeed694f25db06c5268e2e96c56b2..a89582200accacdf86e41b9329c67f3c9be1e730 100644
--- a/coreapi/xmlrpc.c
+++ b/coreapi/xmlrpc.c
@@ -19,8 +19,11 @@
  */
 
 #include <string.h>
+
+#ifdef HAVE_XML2
 #include <libxml/tree.h>
 #include <libxml/xmlwriter.h>
+#endif
 
 #include "linphone/core.h"
 
@@ -80,7 +83,9 @@ void linphone_xml_rpc_request_cbs_set_response(LinphoneXmlRpcRequestCbs *cbs, Li
 	linphone_xml_rpc_request_set_current_callbacks(request, nullptr); \
 	bctbx_list_free(callbacksCopy);
 
+
 static void format_request(LinphoneXmlRpcRequest *request) {
+#ifdef HAVE_XML2
 	char si[64];
 	belle_sip_list_t *arg_ptr = request->arg_list;
 	xmlBufferPtr buf;
@@ -166,8 +171,12 @@ static void format_request(LinphoneXmlRpcRequest *request) {
 	}
 	xmlFreeTextWriter(writer);
 	xmlBufferFree(buf);
+#else
+	ms_warning("xml-rpc support stubbed.");
+#endif
 }
 
+
 static void free_arg(LinphoneXmlRpcArg *arg) {
 	if ((arg->type == LinphoneXmlRpcArgString) && (arg->data.s != NULL)) {
 		belle_sip_free(arg->data.s);
@@ -210,6 +219,7 @@ static void process_auth_requested_from_post_xml_rpc_request(void *data, belle_s
 }
 
 static void parse_valid_xml_rpc_response(LinphoneXmlRpcRequest *request, const char *response_body) {
+#ifdef HAVE_XML2
 	xmlparsing_context_t *xml_ctx = linphone_xmlparsing_context_new();
 	xmlSetGenericErrorFunc(xml_ctx, linphone_xmlparsing_genericxml_error);
 	request->status = LinphoneXmlRpcStatusFailed;
@@ -282,6 +292,7 @@ end:
 		request->callbacks->response(request);
 	}
 	NOTIFY_IF_EXIST(Response, response, request)
+#endif
 }
 
 static void notify_xml_rpc_error(LinphoneXmlRpcRequest *request) {
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a23612abddd497cdb6bef71346488916df0a24bf..695466ce06d23815fc7866d783f82bfd0ef787bb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -43,9 +43,13 @@ endif()
 if(APPLE)
 	list(APPEND INTERFACE_LIBS ${APPLE_LIBS})
 endif()
-set(INTERFACE_LIBS ${LINK_LIBS} xml2 xsd)
 
-list(APPEND LINK_LIBS ${XML2_LIBRARIES})
+if(ENABLE_XML2)
+	list(APPEND LINK_LIBS ${XML2_LIBRARIES})
+endif()
+
+list(APPEND INTERFACE_LIBS ${LINK_LIBS} xsd)
+
 if (ENABLE_ADVANCED_IM)
 	list(APPEND LINK_LIBS ${XercesC_TARGET})
 	if (APPLE AND NOT IOS)
@@ -404,15 +408,7 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
 	chat/chat-room/basic-chat-room.cpp
 	chat/chat-room/chat-room.cpp
 	chat/chat-room/chat-room-params.cpp
-	chat/cpim/header/cpim-core-headers.cpp
-	chat/cpim/header/cpim-generic-header.cpp
-	chat/cpim/header/cpim-header.cpp
-	chat/cpim/message/cpim-message.cpp
-	chat/cpim/parser/cpim-parser.cpp
 	chat/encryption/legacy-encryption-engine.cpp
-	chat/ics/ics.cpp
-	chat/ics/parser/ics-parser.cpp
-	chat/modifier/cpim-chat-message-modifier.cpp
 	chat/modifier/encryption-chat-message-modifier.cpp
 	chat/modifier/file-transfer-chat-message-modifier.cpp
 	chat/modifier/multipart-chat-message-modifier.cpp
@@ -555,6 +551,7 @@ if(ENABLE_ADVANCED_IM)
 		chat/chat-room/client-group-to-basic-chat-room.cpp
 		chat/chat-room/proxy-chat-room.cpp
 		chat/chat-room/server-group-chat-room.cpp
+		chat/modifier/cpim-chat-message-modifier.cpp
 		conference/handlers/local-conference-event-handler.cpp
 		conference/handlers/local-audio-video-conference-event-handler.cpp
 		conference/handlers/local-conference-list-event-handler.cpp
@@ -568,6 +565,13 @@ if(ENABLE_ADVANCED_IM)
 		xml/resource-lists.cpp
 		xml/rlmi.cpp
 		xml/xml.cpp
+		chat/cpim/header/cpim-core-headers.cpp
+		chat/cpim/header/cpim-generic-header.cpp
+		chat/cpim/header/cpim-header.cpp
+		chat/cpim/message/cpim-message.cpp
+		chat/cpim/parser/cpim-parser.cpp
+		chat/ics/ics.cpp
+		chat/ics/parser/ics-parser.cpp
 	)
 	list(APPEND LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES chat/encryption/lime-x3dh-server-engine.h)
 	list(APPEND LINPHONE_CXX_OBJECTS_SOURCE_FILES chat/encryption/lime-x3dh-server-engine.cpp)
diff --git a/src/chat/chat-message/chat-message.cpp b/src/chat/chat-message/chat-message.cpp
index 932d6a78c58541dc2a914ec334b5cb189aefe57a..0d88228dbfd9c25dffc942dca6f6c7dff822652b 100644
--- a/src/chat/chat-message/chat-message.cpp
+++ b/src/chat/chat-message/chat-message.cpp
@@ -771,8 +771,12 @@ LinphoneReason ChatMessagePrivate::receive () {
 		lInfo() << "Cpim step already done, skipping";
 	} else {
 		if (internalContent.getContentType() == ContentType::Cpim) {
+#ifdef HAVE_ADVANCED_IM
 			CpimChatMessageModifier ccmm;
 			ccmm.decode(q->getSharedFromThis(), errorCode);
+#else
+			lWarning() << "Cpim support disabled.";
+#endif
 		}
 		currentRecvStep |= ChatMessagePrivate::Step::Cpim;
 	}
@@ -1116,6 +1120,7 @@ void ChatMessagePrivate::send () {
 			}else lInfo() << "Chat room doesn't support multipart, skipping this modifier";
 		}
 
+#ifdef HAVE_ADVANCED_IM
 		if (chatRoom->canHandleCpim()) {
 			if ((currentSendStep & ChatMessagePrivate::Step::Cpim) == ChatMessagePrivate::Step::Cpim) {
 				lInfo() << "Cpim step already done, skipping";
@@ -1127,6 +1132,9 @@ void ChatMessagePrivate::send () {
 		} else {
 			lInfo() << "Chat room doesn't support CPIM, skipping this modifier";
 		}
+#else
+		lWarning() << "Cpim support disabled.";
+#endif
 
 		if ((currentSendStep & ChatMessagePrivate::Step::Encryption) == ChatMessagePrivate::Step::Encryption) {
 			lInfo() << "Encryption step already done, skipping";
diff --git a/src/chat/modifier/file-transfer-chat-message-modifier.cpp b/src/chat/modifier/file-transfer-chat-message-modifier.cpp
index f9c73da1a5223a6b14d45446e5fe291598a2d66e..2b68cd7a9bf7e0f2ac7b4298cc273e70a8889a2f 100644
--- a/src/chat/modifier/file-transfer-chat-message-modifier.cpp
+++ b/src/chat/modifier/file-transfer-chat-message-modifier.cpp
@@ -1106,6 +1106,7 @@ string FileTransferChatMessageModifier::dumpFileTransferContentAsXmlString(
 	return result;
 }
 
+#ifdef HAVE_XML2
 /* clean the download file name: we must avoid any directory separator (/ or \)
  * so the file is saved in the intended directory */
 static std::string cleanDownloadFileName(std::string fileName) {
@@ -1115,8 +1116,10 @@ static std::string cleanDownloadFileName(std::string fileName) {
 	}
 	return fileName.substr(dirSepPos+1);
 }
+#endif
 
 void FileTransferChatMessageModifier::parseFileTransferXmlIntoContent (const char *xml, FileTransferContent *fileTransferContent) const {
+#ifdef HAVE_XML2
 	xmlDocPtr xmlMessageBody;
 	xmlNodePtr cur;
 	/* parse the msg body to get all informations from it */
@@ -1223,6 +1226,9 @@ void FileTransferChatMessageModifier::parseFileTransferXmlIntoContent (const cha
 		}
 	}
 	xmlFreeDoc(xmlMessageBody);
+#else
+	lWarning() << "parseFileTransferXmlIntoContent(): stubbed.";
+#endif
 }
 
 string FileTransferChatMessageModifier::escapeFileName(const string& fileName) const {
diff --git a/src/conference/conference-info.cpp b/src/conference/conference-info.cpp
index be40bd7b25317206fdcf134cc21c336e444c03e9..d80f89bebf2bbc4991d71756c89a3ac664e80ddf 100644
--- a/src/conference/conference-info.cpp
+++ b/src/conference/conference-info.cpp
@@ -226,6 +226,7 @@ void ConferenceInfo::updateFrom (const std::shared_ptr<ConferenceInfo> & info) {
 }
 
 const string ConferenceInfo::toIcsString (bool cancel, int sequence) const {
+#ifdef HAVE_ADVANCED_IM
 	Ics::Icalendar cal;
 
 	Ics::Icalendar::Method method = Ics::Icalendar::Method::Request;
@@ -295,6 +296,10 @@ const string ConferenceInfo::toIcsString (bool cancel, int sequence) const {
 	}
 
 	return icsString;
+#else
+	lWarning() << "No ICS support, ADVANCED_IM is disabled.";
+	return string();
+#endif
 }
 
 void ConferenceInfo::setCreationTime(time_t time) {
diff --git a/src/factory/factory.cpp b/src/factory/factory.cpp
index 041b0027777e5017a235a11fef64d894ba0523d0..48208929eefeb17114acbd9a2ea314bc76bfe2b4 100644
--- a/src/factory/factory.cpp
+++ b/src/factory/factory.cpp
@@ -46,7 +46,11 @@
 #include "chat/ics/ics.h"
 #include "conference/conference-info.h"
 #include "logger/logger.h"
+
+#ifdef HAVE_SQLITE
 #include "sqlite3_bctbx_vfs.h"
+#endif
+
 #include "dictionary/dictionary.h"
 
 // TODO: From coreapi. Remove me later.
@@ -80,10 +84,12 @@ Factory::Factory(){
 	mPackageSoundDir = PACKAGE_SOUND_DIR;
 	mPackageRingDir = PACKAGE_RING_DIR;
 	mPackageDataDir = PACKAGE_DATA_DIR;
-	
+
+#ifdef HAVE_SQLITE
 	/* register the bctbx sqlite vfs. It is not used by default */
 	/* sqlite3_bctbx_vfs use the default bctbx_vfs, so if encryption is turned on by default, it will apply to sqlte3 db */
 	sqlite3_bctbx_vfs_register(0);
+#endif
 	mEvfsMasterKey = nullptr;
 }
 
@@ -695,10 +701,13 @@ LinphoneDigestAuthenticationPolicy * Factory::createDigestAuthenticationPolicy()
 
 Factory::~Factory (){
 	bctbx_list_free_with_data(mSupportedVideoDefinitions, (bctbx_list_free_func)linphone_video_definition_unref);
-	
+
+
+#ifdef HAVE_SQLITE
 	// sqlite3 vfs is registered at factory creation, so unregister it when destroying it
 	sqlite3_bctbx_vfs_unregister();
-	
+#endif
+
 	// proper cleaning of EVFS master key if any is set
 	if (mEvfsMasterKey != nullptr) {
 		bctbx_clean(mEvfsMasterKey->data(), mEvfsMasterKey->size());
@@ -712,6 +721,7 @@ std::shared_ptr<ConferenceInfo> Factory::createConferenceInfo() const {
 }
 
 std::shared_ptr<ConferenceInfo> Factory::createConferenceInfoFromIcalendarContent(LinphoneContent *content) const {
+#ifdef HAVE_ADVANCED_IM
 	LinphonePrivate::ContentType contentType = L_GET_CPP_PTR_FROM_C_OBJECT(content)->getContentType();
 	if (!contentType.strongEqual(ContentType::Icalendar)) return nullptr;
 
@@ -751,6 +761,10 @@ std::shared_ptr<ConferenceInfo> Factory::createConferenceInfoFromIcalendarConten
 	auto ics = Ics::Icalendar::createFromString(buffer.str());
 
 	return ics ? ics->toConferenceInfo() : nullptr;
+#else
+	lWarning() << "createConferenceInfoFromIcalendarContent(): no ICS support, ADVANCED_IM is disabled.";
+	return nullptr;
+#endif
 }
 
 LinphoneContent *Factory::createQRCode(const std::string& code, const unsigned int& width, const unsigned int& height, const unsigned int& margin) const{
diff --git a/tester/CMakeLists.txt b/tester/CMakeLists.txt
index 646d2bc3e019e5246b936e6c03824c7797db91c9..ea447288885042a414767f963993884e992ea374 100644
--- a/tester/CMakeLists.txt
+++ b/tester/CMakeLists.txt
@@ -316,8 +316,6 @@ set(SOURCE_FILES_CXX
 	dtls_srtp_capability_negotiation_tester.cpp
 	remote-provisioning-tester.cpp
 	contents-tester.cpp
-	cpim-tester.cpp
-	ics-tester.cpp
 	multipart-tester.cpp
 	offeranswer_tester.cpp
 	shared_tester_functions.cpp
@@ -335,7 +333,9 @@ if(ENABLE_FLEXIAPI)
 endif()
 
 if(ENABLE_ADVANCED_IM)
-	list(APPEND SOURCE_FILES_CXX conference-event-tester.cpp)
+	list(APPEND SOURCE_FILES_CXX 	conference-event-tester.cpp
+									cpim-tester.cpp
+									ics-tester.cpp)
 endif()
 
 if(ENABLE_DB_STORAGE)
diff --git a/tester/ics-tester.cpp b/tester/ics-tester.cpp
index d07ec50a21d60875f0e95ed7a3c419cc07229d4e..b13a4a89919bf8cdcb2be3f267aa9fd0326156d8 100644
--- a/tester/ics-tester.cpp
+++ b/tester/ics-tester.cpp
@@ -261,11 +261,6 @@ static void conference_scheduler_invitations_sent_with_error(LinphoneConferenceS
 	}
 }
 
-void setup_conference_info_cbs(LinphoneCoreManager * mgr) {
-	// Needed to send the ICS
-	linphone_core_set_file_transfer_server(mgr->lc, file_transfer_url);
-}
-
 static void send_conference_invitations(bool_t enable_encryption, const char *subject, int curveId, bool_t add_participant_in_error) {
 	bctbx_list_t *coresManagerList = NULL;
 	LinphoneCoreManager* marie = linphone_core_manager_create("marie_lime_x3dh_rc");
diff --git a/tester/liblinphone_tester.c b/tester/liblinphone_tester.c
index 6c8db30ba5452f600608dbee705202ab133faa72..7547369675f71bd157f21ad56c11056e8f6f84e8 100644
--- a/tester/liblinphone_tester.c
+++ b/tester/liblinphone_tester.c
@@ -415,6 +415,8 @@ void liblinphone_tester_add_suites() {
 #ifdef HAVE_ADVANCED_IM
 	bc_tester_add_suite(&group_chat_test_suite);
 	bc_tester_add_suite(&group_chat2_test_suite);
+	bc_tester_add_suite(&cpim_test_suite);
+	bc_tester_add_suite(&ics_test_suite);
 #ifdef HAVE_LIME_X3DH
 	bc_tester_add_suite(&secure_group_chat_test_suite);
 	bc_tester_add_suite(&secure_message_test_suite);
@@ -488,8 +490,6 @@ void liblinphone_tester_add_suites() {
 	bc_tester_add_suite(&log_collection_test_suite);
 	bc_tester_add_suite(&player_test_suite);
 	bc_tester_add_suite(&recorder_test_suite);
-	bc_tester_add_suite(&cpim_test_suite);
-	bc_tester_add_suite(&ics_test_suite);
 	bc_tester_add_suite(&multipart_test_suite);
 	bc_tester_add_suite(&clonable_object_test_suite);
 #ifdef HAVE_DB_STORAGE
diff --git a/tester/local_conference_tester.cpp b/tester/local_conference_tester.cpp
index 1522151e69c5d29f20bf7f62b42cdccbdbd44eeb..768aa17b7651a0c9e2c5691f6100a987f399ca32 100644
--- a/tester/local_conference_tester.cpp
+++ b/tester/local_conference_tester.cpp
@@ -53,6 +53,13 @@ using namespace std;
 using namespace Linphone::Tester;
 using namespace ownership;
 
+
+
+void setup_conference_info_cbs(LinphoneCoreManager * mgr) {
+	// Needed to send the ICS
+	linphone_core_set_file_transfer_server(mgr->lc, file_transfer_url);
+}
+
 namespace LinphoneTest {
 
 class BcAssert {
diff --git a/tester/message_tester.c b/tester/message_tester.c
index d5633017d2a4bdc00d516aa1933eaf53b4f0fb7b..142ae6acb3de20365f77c33a062f8b4a04af413e 100644
--- a/tester/message_tester.c
+++ b/tester/message_tester.c
@@ -35,12 +35,14 @@
 #pragma warning(disable : 4996)
 #endif
 
-
+#ifdef HAVE_SQLITE
 /* sql cache creation string, contains 3 string to be inserted : selfuri/selfuri/peeruri */
 static const char *marie_zid_sqlcache = "BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS ziduri (zuid          INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,zid		BLOB NOT NULL DEFAULT '000000000000',selfuri	 TEXT NOT NULL DEFAULT 'unset',peeruri	 TEXT NOT NULL DEFAULT 'unset'); INSERT INTO `ziduri` (zuid,zid,selfuri,peeruri) VALUES (1,X'4ddc8042bee500ad0366bf93','%s','self'), (2,X'bcb4028bf55e1b7ac4c4edee','%s','%s'); CREATE TABLE IF NOT EXISTS zrtp (zuid		INTEGER NOT NULL DEFAULT 0 UNIQUE,rs1		BLOB DEFAULT NULL,rs2		BLOB DEFAULT NULL,aux		BLOB DEFAULT NULL,pbx		BLOB DEFAULT NULL,pvs		BLOB DEFAULT NULL,FOREIGN KEY(zuid) REFERENCES ziduri(zuid) ON UPDATE CASCADE ON DELETE CASCADE); INSERT INTO `zrtp` (zuid,rs1,rs2,aux,pbx,pvs) VALUES (2,X'f0e0ad4d3d4217ba4048d1553e5ab26fae0b386cdac603f29a66d5f4258e14ef',NULL,NULL,NULL,X'01'); CREATE TABLE IF NOT EXISTS lime (zuid		INTEGER NOT NULL DEFAULT 0 UNIQUE,sndKey		BLOB DEFAULT NULL,rcvKey		BLOB DEFAULT NULL,sndSId		BLOB DEFAULT NULL,rcvSId		BLOB DEFAULT NULL,sndIndex	BLOB DEFAULT NULL,rcvIndex	BLOB DEFAULT NULL,valid		BLOB DEFAULT NULL,FOREIGN KEY(zuid) REFERENCES ziduri(zuid) ON UPDATE CASCADE ON DELETE CASCADE); INSERT INTO `lime` (zuid,sndKey,rcvKey,sndSId,rcvSId,sndIndex,rcvIndex,valid) VALUES (2,X'97c75a5a92a041b415296beec268efc3373ef4aa8b3d5f301ac7522a7fb4e332',x'3b74b709b961e5ebccb1db6b850ea8c1f490546d6adee2f66b5def7093cead3d',X'e2ebca22ad33071bc37631393bf25fc0a9badeea7bf6dcbcb5d480be7ff8c5ea',X'a2086d195344ec2997bf3de7441d261041cda5d90ed0a0411ab2032e5860ea48',X'33376935',X'7ce32d86',X'0000000000000000'); COMMIT;";
 
 static const char *pauline_zid_sqlcache = "BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS ziduri (zuid          INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,zid		BLOB NOT NULL DEFAULT '000000000000',selfuri	 TEXT NOT NULL DEFAULT 'unset',peeruri	 TEXT NOT NULL DEFAULT 'unset'); INSERT INTO `ziduri` (zuid,zid,selfuri,peeruri) VALUES (1,X'bcb4028bf55e1b7ac4c4edee','%s','self'), (2,X'4ddc8042bee500ad0366bf93','%s','%s'); CREATE TABLE IF NOT EXISTS zrtp (zuid		INTEGER NOT NULL DEFAULT 0 UNIQUE,rs1		BLOB DEFAULT NULL,rs2		BLOB DEFAULT NULL,aux		BLOB DEFAULT NULL,pbx		BLOB DEFAULT NULL,pvs		BLOB DEFAULT NULL,FOREIGN KEY(zuid) REFERENCES ziduri(zuid) ON UPDATE CASCADE ON DELETE CASCADE); INSERT INTO `zrtp` (zuid,rs1,rs2,aux,pbx,pvs) VALUES (2,X'f0e0ad4d3d4217ba4048d1553e5ab26fae0b386cdac603f29a66d5f4258e14ef',NULL,NULL,NULL,X'01'); CREATE TABLE IF NOT EXISTS lime (zuid		INTEGER NOT NULL DEFAULT 0 UNIQUE,sndKey		BLOB DEFAULT NULL,rcvKey		BLOB DEFAULT NULL,sndSId		BLOB DEFAULT NULL,rcvSId		BLOB DEFAULT NULL,sndIndex	BLOB DEFAULT NULL,rcvIndex	BLOB DEFAULT NULL,valid		BLOB DEFAULT NULL,FOREIGN KEY(zuid) REFERENCES ziduri(zuid) ON UPDATE CASCADE ON DELETE CASCADE); INSERT INTO `lime` (zuid,rcvKey,sndKey,rcvSId,sndSId,rcvIndex,sndIndex,valid) VALUES (2,X'97c75a5a92a041b415296beec268efc3373ef4aa8b3d5f301ac7522a7fb4e332',x'3b74b709b961e5ebccb1db6b850ea8c1f490546d6adee2f66b5def7093cead3d',X'e2ebca22ad33071bc37631393bf25fc0a9badeea7bf6dcbcb5d480be7ff8c5ea',X'a2086d195344ec2997bf3de7441d261041cda5d90ed0a0411ab2032e5860ea48',X'33376935',X'7ce32d86',X'0000000000000000'); COMMIT;";
 
+#endif
+
 #if 0
 static const char *xmlCacheMigration = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<cache><selfZID>00112233445566778899aabb</selfZID><peer><ZID>99887766554433221100ffee</ZID><rs1>c4274f13a2b6fa05c15ec93158f930e7264b0a893393376dbc80c6eb1cccdc5a</rs1><uri>sip:bob@sip.linphone.org</uri><sndKey>219d9e445d10d4ed64083c7ccbb83a23bc17a97df0af5de4261f3fe026b05b0b</sndKey><rcvKey>747e72a5cc996413cb9fa6e3d18d8b370436e274cd6ba4efc1a4580340af57ca</rcvKey><sndSId>df2bf38e719fa89e17332cf8d5e774ee70d347baa74d16dee01f306c54789869</sndSId><rcvSId>928ce78b0bfc30427a02b1b668b2b3b0496d5664d7e89b75ed292ee97e3fc850</rcvSId><sndIndex>496bcc89</sndIndex><rcvIndex>59337abe</rcvIndex><rs2>5dda11f388384b349d210612f30824268a3753a7afa52ef6df5866dca76315c4</rs2><uri>sip:bob2@sip.linphone.org</uri></peer><peer><ZID>ffeeddccbbaa987654321012</ZID><rs1>858b495dfad483af3c088f26d68c4beebc638bd44feae45aea726a771727235e</rs1><uri>sip:bob@sip.linphone.org</uri><sndKey>b6aac945057bc4466bfe9a23771c6a1b3b8d72ec3e7d8f30ed63cbc5a9479a25</sndKey><rcvKey>bea5ac3225edd0545b816f061a8190370e3ee5160e75404846a34d1580e0c263</rcvKey><sndSId>17ce70fdf12e500294bcb5f2ffef53096761bb1c912b21e972ae03a5a9f05c47</sndSId><rcvSId>7e13a20e15a517700f0be0921f74b96d4b4a0c539d5e14d5cdd8706441874ac0</rcvSId><sndIndex>75e18caa</sndIndex><rcvIndex>2cfbbf06</rcvIndex><rs2>1533dee20c8116dc2c282cae9adfea689b87bc4c6a4e18a846f12e3e7fea3959</rs2></peer><peer><ZID>0987654321fedcba5a5a5a5a</ZID><rs1>cb6ecc87d1dd87b23f225eec53a26fc541384917623e0c46abab8c0350c6929e</rs1><sndKey>92bb03988e8f0ccfefa37a55fd7c5893bea3bfbb27312f49dd9b10d0e3c15fc7</sndKey><rcvKey>2315705a5830b98f68458fcd49623144cb34a667512c4d44686aee125bb8b622</rcvKey><sndSId>94c56eea0dd829379263b6da3f6ac0a95388090f168a3568736ca0bd9f8d595f</sndSId><rcvSId>c319ae0d41183fec90afc412d42253c5b456580f7a463c111c7293623b8631f4</rcvSId><uri>sip:bob@sip.linphone.org</uri><sndIndex>2c46ddcc</sndIndex><rcvIndex>15f5779e</rcvIndex><valid>0000000058f095bf</valid><pvs>01</pvs></peer></cache>";
 #endif
@@ -2133,6 +2135,7 @@ static void info_message_with_body(void){
 }
 
 static int enable_lime_for_message_test(LinphoneCoreManager *marie, LinphoneCoreManager *pauline) {
+#ifdef HAVE_SQLITE
 	char* filepath = NULL;
 	char* stmt = NULL;
 	char* errmsg=NULL;
@@ -2191,6 +2194,9 @@ static int enable_lime_for_message_test(LinphoneCoreManager *marie, LinphoneCore
 	ms_free(marieUri);
 
 	return 0;
+#else
+	return -1;
+#endif
 }
 
 #ifdef HAVE_ADVANCED_IM
@@ -2611,6 +2617,8 @@ end:
 	linphone_core_manager_destroy(pauline);
 }
 
+#ifdef HAVE_SQLITE
+
 static void lime_text_message_to_non_lime(bool_t sender_policy_mandatory, bool_t lime_key_available) {
 	LinphoneChatRoom* chat_room;
 	LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
@@ -2679,6 +2687,8 @@ static void lime_text_message_without_cache(void) {
 	lime_text_message_to_non_lime(TRUE, FALSE);
 }
 
+#endif
+
 static void lime_multiple_messages_while_network_unreachable(void) {
 	LinphoneChatRoom* chat_room;
 	LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
@@ -4280,10 +4290,12 @@ test_t lime_message_tests[] = {
 	TEST_ONE_TAG("IM error delivery notification online", im_error_delivery_notification_online, "LIME"),
 	TEST_ONE_TAG("IM error delivery notification offline", im_error_delivery_notification_offline, "LIME"),
 	TEST_ONE_TAG("Lime text message", lime_text_message, "LIME"),
+#ifdef HAVE_SQLITE
 	TEST_ONE_TAG("Lime text message to non lime", lime_text_message_to_non_lime_mandatory_policy, "LIME"),
 	TEST_ONE_TAG("Lime text message to non lime with preferred policy", lime_text_message_to_non_lime_preferred_policy, "LIME"),
 	TEST_ONE_TAG("Lime text message to non lime with preferred policy 2", lime_text_message_to_non_lime_preferred_policy_2, "LIME"),
 	TEST_ONE_TAG("Lime text message without cache", lime_text_message_without_cache, "LIME"),
+#endif
 	TEST_ONE_TAG("Lime multiple messages while network wasn't reachable", lime_multiple_messages_while_network_unreachable, "LIME"),
 	TEST_ONE_TAG("Lime transfer message", lime_transfer_message, "LIME"),
 	TEST_ONE_TAG("Lime transfer message 2", lime_transfer_message_2, "LIME"),
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 91eca62db22d30964f3ce936eea59e9b6c0538cf..a5cc49dd8d692799327e9ac1e702587efd8d01e8 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -40,19 +40,24 @@ target_link_libraries(lp-sendmsg ${LINPHONE_LIBS_FOR_TOOLS} ortp mediastreamer $
 set_target_properties(lp-sendmsg PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
 set_target_properties(lp-sendmsg PROPERTIES LINKER_LANGUAGE CXX)
 
-set(LP_LPC2XML_TEST_SOURCE_FILES lpc2xml_test.c)
-bc_apply_compile_flags(LP_LPC2XML_TEST_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_C)
-add_executable(lpc2xml_test ${USE_BUNDLE} ${LP_LPC2XML_TEST_SOURCE_FILES})
-target_link_libraries(lpc2xml_test ${LINPHONE_LIBS_FOR_TOOLS} ortp mediastreamer ${XSD_LIBRARIES})
-set_target_properties(lpc2xml_test PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
-set_target_properties(lpc2xml_test PROPERTIES LINKER_LANGUAGE CXX)
+if(ENABLE_XML2)
 
-set(LP_XML2LPC_TEST_SOURCE_FILES xml2lpc_test.c)
-bc_apply_compile_flags(LP_XML2LPC_TEST_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_C)
-add_executable(xml2lpc_test ${USE_BUNDLE} ${LP_XML2LPC_TEST_SOURCE_FILES})
-target_link_libraries(xml2lpc_test ${LINPHONE_LIBS_FOR_TOOLS} ortp mediastreamer ${XSD_LIBRARIES})
-set_target_properties(xml2lpc_test PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
-set_target_properties(xml2lpc_test PROPERTIES LINKER_LANGUAGE CXX)
+	set(LP_LPC2XML_TEST_SOURCE_FILES lpc2xml_test.c)
+	bc_apply_compile_flags(LP_LPC2XML_TEST_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_C)
+	add_executable(lpc2xml_test ${USE_BUNDLE} ${LP_LPC2XML_TEST_SOURCE_FILES})
+	target_link_libraries(lpc2xml_test ${LINPHONE_LIBS_FOR_TOOLS} ortp mediastreamer ${XSD_LIBRARIES})
+	set_target_properties(lpc2xml_test PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
+	set_target_properties(lpc2xml_test PROPERTIES LINKER_LANGUAGE CXX)
+
+	set(LP_XML2LPC_TEST_SOURCE_FILES xml2lpc_test.c)
+	bc_apply_compile_flags(LP_XML2LPC_TEST_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_C)
+	add_executable(xml2lpc_test ${USE_BUNDLE} ${LP_XML2LPC_TEST_SOURCE_FILES})
+	target_link_libraries(xml2lpc_test ${LINPHONE_LIBS_FOR_TOOLS} ortp mediastreamer ${XSD_LIBRARIES})
+	set_target_properties(xml2lpc_test PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
+	set_target_properties(xml2lpc_test PROPERTIES LINKER_LANGUAGE CXX)
+
+	set(LINPHONE_XMLTOOLS lpc2xml_test xml2lpc_test)
+endif()
 
 set(LP_TEST_ECC_SOURCE_FILES test_ecc.c)
 bc_apply_compile_flags(LP_TEST_ECC_SOURCE_FILES STRICT_OPTIONS_CPP STRICT_OPTIONS_C)
@@ -62,7 +67,7 @@ set_target_properties(lp-test-ecc PROPERTIES LINK_FLAGS "${LINPHONE_LDFLAGS}")
 set_target_properties(lp-test-ecc PROPERTIES LINKER_LANGUAGE CXX)
 
 if (NOT IOS)
-	install(TARGETS lp-auto-answer lp-sendmsg lpc2xml_test xml2lpc_test lp-test-ecc
+	install(TARGETS lp-auto-answer lp-sendmsg  lp-test-ecc ${LINPHONE_XMLTOOLS}
 		RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
 		LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
 		ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}