--- a/configure.ac Mon Jun 16 23:01:47 2014 +0200
+++ b/configure.ac Tue Jun 17 00:03:58 2014 +0200
@@ -1023,127 +1023,36 @@
dnl #######################################################################
-dnl # Check for Gadu-Gadu client includes and libraries
+dnl # Check for Gadu-Gadu protocol library (libgadu) dnl #######################################################################
-AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [compile the Gadu-Gadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"])
-AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [compile the Gadu-Gadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"])
-if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then
- gadu_manual_check="yes"
-if test "x$gadu_manual_check" = "xno"; then
- PKG_CHECK_MODULES(GADU, [libgadu >= 1.12.0], [
- if test "$ac_gadu_includes" != "no"; then
- GADU_CFLAGS="-I$ac_gadu_includes"
- CPPFLAGS_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
- AC_CHECK_HEADER(libgadu.h, [gadu_includes=yes])
- CPPFLAGS="$CPPFLAGS_save"
- if test "$ac_gadu_libs" != "no"; then
- GADU_LIBS="-L$ac_gadu_libs"
- GADU_LIBS="$GADU_LIBS -lgadu"
- AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
-GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
+PKG_CHECK_MODULES(LIBGADU, [libgadu >= 1.12.0], [have_libgadu=yes], [have_libgadu=no]) -if test "x$gadu_libs" = "xyes"; then
- AC_MSG_CHECKING(for libgadu GPL compatibility)
- CPPFLAGS_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $GADU_CFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
-#if defined(__GG_LIBGADU_HAVE_OPENSSL) || defined(GG_CONFIG_HAVE_OPENSSL)
-#error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <libgadu.h>]], [[
-#if GG_DEFAULT_PROTOCOL_VERSION < 0x2e
-#error "Your libgadu version is too old. libpurple requires 1.12.0 or higher."
- AC_DEFINE([HAVE_LIBGADU], [1],
- [Define to 1 if you have libgadu.])
- echo "Your supplied copy of libgadu is too old."
- echo "Install version 1.12.0 or newer."
- echo "Then rerun this ./configure"
- echo "Falling back to using our own copy of libgadu"
+if test "x$have_libgadu" = "xyes"; then + AC_CHECK_LIB(gadu, gg_is_gpl_compliant, , [ +libgadu is not compatible with the GPL when compiled with OpenSSL support. +To compile against system libgadu, please recompile libgadu using: +./configure --with-openssl=no +Then rerun this ./configure +Falling back to using our own copy of libgadu.
- echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
- echo "To compile against system libgadu, please recompile libgadu using:"
- echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared"
- echo "Then rerun this ./configure"
- echo "Falling back to using our own copy of libgadu"
- CPPFLAGS="$CPPFLAGS_save"
-AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
-if test "x$gadu_libs" != "xyes"; then
- AC_CHECK_LIB(gnutls, gnutls_certificate_set_x509_system_trust, [gg_have_gnutls_csxst=yes], [gg_have_gnutls_csxst=no])
- if test "x$gg_have_gnutls_csxst" = "xno"; then
- for i in /etc/ssl/ca-bundle.pem \
- /etc/ssl/certs/ca-certificates.crt \
- /etc/pki/tls/cert.pem \
- /usr/local/share/certs/ca-root-nss.crt \
- if test "x$gg_have_gnutls_csxst" = "xyes"; then
- AC_DEFINE(HAVE_GNUTLS_CERTIFICATE_SET_X509_SYSTEM_TRUST, 1, [gnutls contains the gnutls_certificate_set_x509_system_trust function])
- if test "x$gg_gnutls_sts" != "x"; then
- AC_DEFINE_UNQUOTED(GG_CONFIG_GNUTLS_SYSTEM_TRUST_STORE, ["$gg_gnutls_sts"], [use the given file as GnuTLS default trust store])
- PKG_CHECK_MODULES([GNUTLS_2_10], [gnutls >= 2.10.0], [
- AC_DEFINE([HAVE_GNUTLS_2_10], [], [Defined if GnuTLS >= 2.10.0 is available.])
+AM_CONDITIONAL(HAVE_LIBGADU, test "x$have_libgadu" = "xyes") +if test "x$have_libgadu" = "xyes"; then + AC_DEFINE(HAVE_LIBGADU, 1, [Linked with external libgadu]) -if test "x$gadu_libs" = "x"; then
+AC_SUBST(LIBGADU_CFLAGS)
AC_ARG_ENABLE(distrib,,,enable_distrib=no)
AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes")
@@ -2682,7 +2591,7 @@
echo Build with Cyrus SASL support. : $enable_cyrus_sasl
echo Use kerberos 4 with zephyr.... : $kerberos
echo Use external libzephyr........ : $zephyr
-echo Use external libgadu.......... : $gadu_libs
+echo Use external libgadu.......... : $have_libgadu echo Install pixmaps............... : $enable_pixmaps
echo Old tray icon compatibility... : $enable_traycompat
echo Install translations.......... : $enable_i18n
--- a/libpurple/protocols/gg/Makefile.am Mon Jun 16 23:01:47 2014 +0200
+++ b/libpurple/protocols/gg/Makefile.am Tue Jun 17 00:03:58 2014 +0200
@@ -45,8 +45,8 @@
pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
@@ -89,16 +89,21 @@
-INTGG_CFLAGS = -I$(top_srcdir)/libpurple/protocols/gg/lib -DGG_IGNORE_DEPRECATED -DUSE_INTERNAL_LIBGADU
+INTGG_LIBS = $(ZLIB_LIBS) + -I$(top_srcdir)/libpurple/protocols/gg/lib \ + INTGG_LIBS += $(GNUTLS_LIBS) + INTGG_CFLAGS += $(GNUTLS_CFLAGS)
-GADU_LIBS += $(GNUTLS_LIBS)
-GADU_CFLAGS += $(GNUTLS_CFLAGS)
@@ -116,25 +121,25 @@
-st = -DPURPLE_STATIC_PRPL $(GADU_CFLAGS)
+st = -DPURPLE_STATIC_PRPL noinst_LTLIBRARIES = libgg.la
libgg_la_SOURCES = $(GGSOURCES)
libgg_la_CFLAGS = $(AM_CFLAGS)
-libgg_la_LIBADD = $(GADU_LIBS)
+libgg_la_LIBADD = $(LIBGADU_LIBS) $(INTGG_LIBS)
pkg_LTLIBRARIES = libgg.la
libgg_la_SOURCES = $(GGSOURCES)
-libgg_la_LIBADD = $(GLIB_LIBS) $(GADU_LIBS)
+libgg_la_LIBADD = $(GLIB_LIBS) $(LIBGADU_LIBS) $(INTGG_LIBS) -I$(top_srcdir)/libpurple \
-I$(top_builddir)/libpurple \
--- a/libpurple/protocols/gg/gg.c Mon Jun 16 23:01:47 2014 +0200
+++ b/libpurple/protocols/gg/gg.c Tue Jun 17 00:03:58 2014 +0200
@@ -2242,6 +2242,16 @@
+static gboolean ggp_load(PurplePlugin *plugin) + purple_debug_info("gg", "Loading Gadu-Gadu protocol plugin with " + "libgadu %s...\n", gg_libgadu_version()); static PurplePluginProtocolInfo prpl_info =
@@ -2339,7 +2349,7 @@
"boler@sourceforge.net", /* author */
PURPLE_WEBSITE, /* homepage */
--- a/pidgin/gtkdialogs.c Mon Jun 16 23:01:47 2014 +0200
+++ b/pidgin/gtkdialogs.c Tue Jun 17 00:03:58 2014 +0200
@@ -633,14 +633,10 @@
-#if defined(_WIN32) || defined(USE_INTERNAL_LIBGADU)
- g_string_append(str, " <b>Gadu-Gadu library (libgadu):</b> Internal<br/>");
+ g_string_append(str, " <b>Gadu-Gadu library (libgadu):</b> External<br/>");
- g_string_append(str, " <b>Gadu-Gadu library (libgadu):</b> Enabled<br/>");
- g_string_append(str, " <b>Gadu-Gadu library (libgadu):</b> Disabled<br/>");
+ g_string_append(str, " <b>Gadu-Gadu library (libgadu):</b> Internal<br/>");