# HG changeset patch # User Myhailo Danylenko # Date 1350589665 -10800 # Node ID 50173578fddcef87dd4c8aabb7342842e2c0a8e0 # Parent 694833145b98629ddccb0e3ef3ebab57f6857269 Comply with dev:24 diff -r 694833145b98 -r 50173578fddc CMakeLists.txt --- a/CMakeLists.txt Mon Aug 20 22:51:51 2012 +0300 +++ b/CMakeLists.txt Thu Oct 18 22:47:45 2012 +0300 @@ -30,6 +30,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 + #include + #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}) @@ -69,6 +80,11 @@ 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:2 | compl:3") +endif() configure_file(disco.avv.in disco.avv) ## Installation diff -r 694833145b98 -r 50173578fddc disco.avv.in --- a/disco.avv.in Mon Aug 20 22:51:51 2012 +0300 +++ b/disco.avv.in Thu Oct 18 22:47:45 2012 +0300 @@ -5,7 +5,7 @@ Description: ${CPACK_PACKAGE_DESCRIPTION_SUMMARY} # Right now it does not require caps, but may require in future # commands depend on building envioronment: 4+3, 2+1 -Requires: ( commands:4 | commands:3 ) + ( compl:3 | compl:2 ) + +Requires: ( commands:4 | commands:3 ) + ( ${AVV_COMPL_VERSION} ) + ( roster:4 | roster:3 | roster:2 | roster:1 ) + utils:2 + ( hooks:5 | hooks:4 | hooks:3 | hooks:2 ) + ( xmpp:6 | xmpp:5 | xmpp:4 | xmpp:3 | xmpp:2 | xmpp:1 ) + logprint:3 + diff -r 694833145b98 -r 50173578fddc disco.c --- a/disco.c Mon Aug 20 22:51:51 2012 +0300 +++ b/disco.c Thu Oct 18 22:47:45 2012 +0300 @@ -648,7 +648,11 @@ void disco_init (void) { // completion +#ifdef MCABBER_API_HAVE_COMPL_FLAGS + disco_cid = compl_new_category (COMPL_FLAGS_SORT); +#else disco_cid = compl_new_category (); +#endif if (disco_cid) { compl_add_category_word (disco_cid, "info"); compl_add_category_word (disco_cid, "items");