1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-04 00:33:13 +02:00

core: use #ifdef to check if versions are defined in signal "debug_libs"

This commit is contained in:
Sebastien Helleu
2013-11-18 14:31:26 +01:00
parent 3b53a3a8be
commit fba9839587
2 changed files with 32 additions and 0 deletions
+28
View File
@@ -522,19 +522,47 @@ debug_libs_cb (void *data, const char *signal, const char *type_data,
(void) signal_data;
gui_chat_printf (NULL, " core:");
/* display ncurses version */
gui_main_debug_libs ();
/* display gcrypt version */
#ifdef GCRYPT_VERSION
gui_chat_printf (NULL, " gcrypt: %s%s",
GCRYPT_VERSION,
(weechat_no_gcrypt) ? " (not initialized)" : "");
#else
gui_chat_printf (NULL, " gcrypt: (?)%s",
(weechat_no_gcrypt) ? " (not initialized)" : "");
#endif
/* display gnutls version */
#ifdef HAVE_GNUTLS
#ifdef GNUTLS_VERSION
gui_chat_printf (NULL, " gnutls: %s%s",
GNUTLS_VERSION,
(weechat_no_gnutls) ? " (not initialized)" : "");
#else
gui_chat_printf (NULL, " gnutls: (?)%s",
(weechat_no_gnutls) ? " (not initialized)" : "");
#endif
#else
gui_chat_printf (NULL, " gnutls: (not available)");
#endif
/* display curl version */
#ifdef LIBCURL_VERSION
gui_chat_printf (NULL, " curl: %s", LIBCURL_VERSION);
#else
gui_chat_printf (NULL, " curl: (?)");
#endif
/* display zlib version */
#ifdef ZLIB_VERSION
gui_chat_printf (NULL, " zlib: %s", ZLIB_VERSION);
#else
gui_chat_printf (NULL, " zlib: (?)");
#endif
return WEECHAT_RC_OK;
}
+4
View File
@@ -304,8 +304,12 @@ gui_main_signal_sigwinch ()
void
gui_main_debug_libs ()
{
#if defined(NCURSES_VERSION) && defined(NCURSES_VERSION_PATCH)
gui_chat_printf (NULL, " ncurses: %s (patch %d)",
NCURSES_VERSION, NCURSES_VERSION_PATCH);
#else
gui_chat_printf (NULL, " ncurses: (?)");
#endif
}
/*