--- a/CMakeLists.txt Sun Sep 23 15:38:29 2012 +0300
+++ b/CMakeLists.txt Thu Oct 18 23:24:14 2012 +0300
@@ -60,6 +60,17 @@
set(CMAKE_REQUIRED_LIBRARIES ${LM_LIBRARIES})
set(CMAKE_REQUIRED_FLAGS ${LM_LDFLAGS} ${LM_CFLAGS})
check_symbol_exists(lm_connection_unregister_reply_handler loudmouth/loudmouth.h HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER)
+include(CheckCSourceCompiles)
+set(CMAKE_REQUIRED_INCLUDES ${MCABBER_INCLUDE_DIRS})
+set(CMAKE_REQUIRED_LIBRARIES ${MCABBER_LIBRARIES})
+set(CMAKE_REQUIRED_FLAGS ${MCABBER_LDFLAGS} ${MCABBER_CFLAGS})
+check_c_source_compiles("
+ #include <glib.h>
+ #include <mcabber/api.h>
+ #ifdef MCABBER_API_HAVE_COMPL_FLAGS
+ int main (void) { return 0; }
+ #endif
+ " HAVE_MCABBER_COMPLETION_FLAGS)
link_directories(${GLIB_LIBRARY_DIRS}
${LM_LIBRARY_DIRS}
${MCABBER_LIBRARY_DIRS})
@@ -110,6 +121,12 @@
set(CPACK_SOURCE_IGNORE_FILES "/\\\\..*;\\\\.swp;~$;/build/;\\\\.tar\\\\.;\\\\.deb;\\\\.so")
include(CPack)
+if(HAVE_MCABBER_COMPLETION_FLAGS)
+ set(AVV_COMPL_VERSION "compl:4")
+else()
+ set(AVV_COMPL_VERSION "compl:3 | compl:2")
+endif()
+
foreach(AVMODULE IN LISTS MODULE_LIST)
configure_file(avv/${AVMODULE}.in avv/${AVMODULE})
endforeach(AVMODULE)
@@ -128,4 +145,4 @@
install(DIRECTORY help DESTINATION share/mcabber PATTERN "*~" EXCLUDE)
install(DIRECTORY ${PROJECT_BINARY_DIR}/avv/ DESTINATION share/mcabber/avv/modules PATTERN "*~" EXCLUDE)
-## The End ## vim: se ts=4: ##
+## The End ## vim: se ts=4 sw=4: ##
--- a/activity.c Sun Sep 23 15:38:29 2012 +0300
+++ b/activity.c Thu Oct 18 23:24:14 2012 +0300
@@ -261,7 +261,14 @@
void activity_init (void)
{
+#ifdef MCABBER_API_HAVE_COMPL_FLAGS
+ activity_cid1 = compl_new_category (COMPL_FLAGS_SORT);
+ activity_cid2 = compl_new_category (COMPL_FLAGS_SORT);
+#else
activity_cid1 = compl_new_category ();
+ activity_cid2 = compl_new_category ();
+#endif
+
if (activity_cid1) {
const gchar **activity;
@@ -269,7 +276,6 @@
compl_add_category_word (activity_cid1, *activity);
}
- activity_cid2 = compl_new_category ();
if (activity_cid2) {
const gchar **activity;
--- a/avv/activity.in Sun Sep 23 15:38:29 2012 +0300
+++ b/avv/activity.in Thu Oct 18 23:24:14 2012 +0300
@@ -4,7 +4,7 @@
Version: ${PROJECT_VERSION}
Description: ${ACTIVITY_DESCRIPTION_AVV}
# commands depend on building environment - 4, 3 or 2+1
-Requires: commands:4 + ( compl:3 | compl:2 ) + ( hooks:5 | hooks:4 | hooks:3 | hooks:2 ) +
+Requires: commands:4 + ( ${AVV_COMPL_VERSION} ) + ( hooks:5 | hooks:4 | hooks:3 | hooks:2 ) +
logprint:3 + ( hbuf:3 | hbuf:2 | hbuf:1 ) +
( screen:10 | screen:9 | screen:8 | screen:7 | screen:6 | screen:5 | screen:4 ) +
( roster:4 | roster:3 | roster:2 | roster:1 ) + utils:2 + pep_activity:2
--- a/avv/geoloc.in Sun Sep 23 15:38:29 2012 +0300
+++ b/avv/geoloc.in Thu Oct 18 23:24:14 2012 +0300
@@ -4,7 +4,7 @@
Version: ${PROJECT_VERSION}
Description: ${GEOLOC_DESCRIPTION_AVV}
# commands depend on compilaton environment
-Requires: ( roster:4 | roster:3 | roster:2 | roster:1 ) + commands:4 + ( compl:3 | compl:2 ) +
+Requires: ( roster:4 | roster:3 | roster:2 | roster:1 ) + commands:4 + ( ${AVV_COMPL_VERSION} ) +
( hooks:5 | hooks:4 | hooks:3 | hooks:2 | hooks:1 ) + utils:2 +
logprint:3 +
( screen:10 | screen:9 | screen:8 | screen:7 | screen:6 | screen:5 | screen:4 ) +
--- a/avv/mood.in Sun Sep 23 15:38:29 2012 +0300
+++ b/avv/mood.in Thu Oct 18 23:24:14 2012 +0300
@@ -5,7 +5,7 @@
Description: ${MOOD_DESCRIPTION_AVV}
# commands depend on building environment: 4, 3, 2+1
Requires: ( roster:4 | roster:3 | roster:2 | roster:1 ) + commands:4 +
- ( compl:3 | compl:2 | compl:1 ) + utils:2 +
+ ( ${AVV_COMPL_VERSION} ) + utils:2 +
( hooks:5 | hooks:4 | hooks:3 | hooks:2 ) +
logprint:3 +
( screen:10 | screen:9 | screen:8 | screen:7 | screen:6 | screen:5 | screen:4 ) +
--- a/avv/tune.in Sun Sep 23 15:38:29 2012 +0300
+++ b/avv/tune.in Thu Oct 18 23:24:14 2012 +0300
@@ -3,7 +3,7 @@
Method: glib
Version: ${PROJECT_VERSION}
Description: ${TUNE_DESCRIPTION_AVV}
-Requires: commands:4 + ( compl:3 | compl:2 ) + ( hooks:5 | hooks:4 | hooks:3 | hooks:2 ) + logprint:3 +
+Requires: commands:4 + ( ${AVV_COMPL_VERSION} ) + ( hooks:5 | hooks:4 | hooks:3 | hooks:2 ) + logprint:3 +
( screen:10 | screen:9 | screen:8 | screen:7 | screen:6 | screen:5 | screen:4 ) +
( roster:4 | roster:3 | roster:2 | roster:1 ) + utils:2 +
( hbuf:3 | hbuf:2 | hbuf:1 ) + pep_tune:2
--- a/geoloc.c Sun Sep 23 15:38:29 2012 +0300
+++ b/geoloc.c Thu Oct 18 23:24:14 2012 +0300
@@ -254,7 +254,12 @@
void geoloc_init ( void )
{
+#ifdef MCABBER_API_HAVE_COMPL_FLAGS
+ geoloc_cid = compl_new_category (COMPL_FLAGS_SORT);
+#else
geoloc_cid = compl_new_category ();
+#endif
+
if (geoloc_cid) {
compl_add_category_word (geoloc_cid, "accuracy=");
compl_add_category_word (geoloc_cid, "alt=");
--- a/mood.c Sun Sep 23 15:38:29 2012 +0300
+++ b/mood.c Thu Oct 18 23:24:14 2012 +0300
@@ -245,7 +245,12 @@
void mood_init (void)
{
+#ifdef MCABBER_API_HAVE_COMPL_FLAGS
+ mood_cid = compl_new_category (COMPL_FLAGS_SORT);
+#else
mood_cid = compl_new_category ();
+#endif
+
if (mood_cid) {
const gchar **mood;
--- a/tune.c Sun Sep 23 15:38:29 2012 +0300
+++ b/tune.c Thu Oct 18 23:24:14 2012 +0300
@@ -236,7 +236,12 @@
void tune_init(void)
{
+#ifdef MCABBER_API_HAVE_COMPL_FLAGS
+ tune_cid = compl_new_category (COMPL_FLAGS_SORT);
+#else
tune_cid = compl_new_category ();
+#endif
+
if (tune_cid) {
compl_add_category_word (tune_cid, "artist=");
compl_add_category_word (tune_cid, "length=");