aboutsummaryrefslogtreecommitdiffstats
path: root/version_info.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2006-09-12 17:50:36 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2006-09-12 17:50:36 +0000
commit3ea6a0c277e4e1aaec45c6c27d4c2831dbaee0de (patch)
tree359d7490302e73915c19e94005cc5b500934c285 /version_info.c
parent24a4b8be046e54fe71a4df62496f16aeec87914b (diff)
add version output (e.g. in the About box) for the following libraries:
-GnuTLS -Gcrypt -Kerberos (no version, only if compiled with MIT/HEIMDAL or without any kerberos) -PortAudio (version number only for V>=19, maybe need some fixing) Don't know how to use the line breaking stuff, if someone could help me here ... git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19217 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'version_info.c')
-rw-r--r--version_info.c67
1 files changed, 67 insertions, 0 deletions
diff --git a/version_info.c b/version_info.c
index 7d07efc765..a92e469983 100644
--- a/version_info.c
+++ b/version_info.c
@@ -52,6 +52,18 @@
#endif /* HAVE_SOME_SNMP */
+#if (defined(HAVE_LIBGCRYPT) || defined(HAVE_LIBGNUTLS)) && defined(_WIN32)
+#include <winposixtype.h>
+#endif
+
+#ifdef HAVE_LIBGCRYPT
+#include <gcrypt.h>
+#endif /* HAVE_LIBGCRYPT */
+
+#ifdef HAVE_LIBGNUTLS
+#include <gnutls/gnutls.h>
+#endif /* HAVE_LIBGNUTLS */
+
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
@@ -118,6 +130,7 @@ get_compiled_version_info(GString *str)
{
gint break_point;
+ /* GLIB */
g_string_append(str, "with ");
g_string_sprintfa(str,
#ifdef GLIB_MAJOR_VERSION
@@ -133,6 +146,7 @@ get_compiled_version_info(GString *str)
g_string_append(str, ",");
do_word_wrap(str, break_point);
+ /* LIBZ */
g_string_append(str, " ");
break_point = str->len - 1;
#ifdef HAVE_LIBZ
@@ -148,6 +162,7 @@ get_compiled_version_info(GString *str)
g_string_append(str, ",");
do_word_wrap(str, break_point);
+ /* PCRE */
g_string_append(str, " ");
break_point = str->len - 1;
#ifdef HAVE_LIBPCRE
@@ -168,6 +183,7 @@ get_compiled_version_info(GString *str)
g_string_append(str, ",");
do_word_wrap(str, break_point);
+ /* SNMP */
/* Oh, this is pretty. */
/* Oh, ha. you think that was pretty. Try this:! --Wes */
g_string_append(str, " ");
@@ -190,6 +206,7 @@ get_compiled_version_info(GString *str)
g_string_append(str, ",");
do_word_wrap(str, break_point);
+ /* ADNS */
g_string_append(str, " ");
break_point = str->len - 1;
#ifdef HAVE_GNU_ADNS
@@ -199,6 +216,7 @@ get_compiled_version_info(GString *str)
#endif /* HAVE_GNU_ADNS */
g_string_append(str, ",");
+ /* LUA */
g_string_append(str, " ");
break_point = str->len - 1;
#ifdef HAVE_LUA
@@ -208,6 +226,55 @@ get_compiled_version_info(GString *str)
g_string_append(str, "without Lua");
#endif /* HAVE_LUA */
+ /* GnuTLS */
+ g_string_append(str, " ");
+ break_point = str->len - 1;
+#ifdef HAVE_LIBGNUTLS
+ g_string_append(str, "with GnuTLS " LIBGNUTLS_VERSION);
+#else
+ g_string_append(str, "without GnuTLS");
+#endif /* HAVE_LIBGNUTLS */
+
+ /* Gcrypt */
+ g_string_append(str, " ");
+ break_point = str->len - 1;
+#ifdef HAVE_LIBGCRYPT
+ g_string_append(str, "with Gcrypt " GCRYPT_VERSION);
+#else
+ g_string_append(str, "without Gcrypt");
+#endif /* HAVE_LIBGCRYPT */
+
+ /* Kerberos */
+ /* XXX - I don't see how to get the version number, at least for KfW */
+ g_string_append(str, " ");
+ break_point = str->len - 1;
+#ifdef HAVE_KERBEROS
+#ifdef HAVE_MIT_KERBEROS
+ g_string_append(str, "with MIT Kerberos");
+#else
+ /* HAVE_HEIMDAL_KERBEROS */
+ g_string_append(str, "with Heimdal Kerberos");
+#endif
+#else
+ g_string_append(str, "without Kerberos");
+#endif /* HAVE_KERBEROS */
+
+ /* PortAudio */
+ g_string_append(str, " ");
+ break_point = str->len - 1;
+#ifdef HAVE_PORTAUDIO
+#ifdef PORTAUDIO_API_1
+ g_string_append(str, "with PortAudio <= V18");
+#else
+ g_string_append(str, "with PortAudio ");
+ /* XXX - is this correct? Will need an #include - but I can't test it */
+ g_string_append(str, Pa_GetVersionText());
+#endif
+#else
+ g_string_append(str, "without PortAudio");
+#endif /* HAVE_PORTAUDIO */
+
+
g_string_append(str, ".");
do_word_wrap(str, break_point);