[update] Add carbons completion id
authorMyhailo Danylenko <isbear@ukrpost.net>
Sat, 07 Nov 2015 22:36:02 +0200
changeset 147 66a63c9609de
parent 146 04d19c9c1196
child 148 b222f4d111d9
[update] Add carbons completion id
CMakeLists.txt
config.h.in
lua.c
--- a/CMakeLists.txt	Wed Nov 28 20:17:53 2012 +0200
+++ b/CMakeLists.txt	Sat Nov 07 22:36:02 2015 +0200
@@ -58,6 +58,8 @@
 	int main (void) { return 0; }
 	#endif
 	" HAVE_MCABBER_COMPLETION_FLAGS)
+include(CheckSymbolExists)
+check_symbol_exists(COMPL_CARBONS mcabber/compl.h HAVE_COMPL_CARBONS)
 link_directories(${GLIB_LIBRARY_DIRS}
 				 ${GMODULE_LIBRARY_DIRS}
 				 ${MCABBER_LIBRARY_DIRS})
--- a/config.h.in	Wed Nov 28 20:17:53 2012 +0200
+++ b/config.h.in	Sat Nov 07 22:36:02 2015 +0200
@@ -36,6 +36,9 @@
 // define this to enable lua-loudmouth log messages handler
 #cmakedefine LLM_LOG_HANDLER
 
+// indicates, whether mcabber have built-in carbons completion
+#cmakedefine HAVE_COMPL_CARBONS
+
 // size of background pipe reading buffer
 #define MLUA_BGREAD_BUFFER   ( ${ML_BGREAD_BUFFER} )
 
--- a/lua.c	Wed Nov 28 20:17:53 2012 +0200
+++ b/lua.c	Sat Nov 07 22:36:02 2015 +0200
@@ -801,6 +801,9 @@
 	{ "otr",       COMPL_OTR       },
 	{ "ortpolicy", COMPL_OTRPOLICY },
 	{ "module",    COMPL_MODULE    },
+#ifdef HAVE_COMPL_CARBONS
+	{ "carbons",   COMPL_CARBONS   },
+#endif
 	{ "yesno",     0               },
 	{ NULL,        0               },
 };