Fri, 07 Sep 2012 14:03:18 +0200
Fix compilation of older distros. Fixes #15310
--- a/Makefile.am Tue Sep 04 01:49:58 2012 +0200 +++ b/Makefile.am Fri Sep 07 14:03:18 2012 +0200 @@ -6,7 +6,7 @@ HACKING \ Makefile.mingw \ PLUGIN_HOWTO \ - README.MTN \ + README.hg \ README.mingw \ config.h.mingw \ doxy2devhelp.xsl \
--- a/configure.ac Tue Sep 04 01:49:58 2012 +0200 +++ b/configure.ac Fri Sep 07 14:03:18 2012 +0200 @@ -820,10 +820,8 @@ dnl ####################################################################### PKG_CHECK_MODULES(ZLIB, [zlib >= 1.2.0], , [ - AC_MSG_RESULT(no) - AC_MSG_ERROR([ -You must have zlib >= 1.2.0 development headers installed to build. -])]) + AC_SEARCH_LIBS([deflate], [z], [], AC_MSG_ERROR([You must have zlib >= 1.2.0 development headers installed to build.]), []) +]) AC_SUBST(ZLIB_CFLAGS) AC_SUBST(ZLIB_LIBS)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libpurple/glibcompat.h Fri Sep 07 14:03:18 2012 +0200 @@ -0,0 +1,44 @@ +/* pidgin + * + * Pidgin is the legal property of its developers, whose names are too numerous + * to list here. Please refer to the COPYRIGHT file distributed with this + * source distribution. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + */ +#ifndef _PIDGINGLIBCOMPAT_H_ +#define _PIDGINGLIBCOMPAT_H_ + +/* This file is internal to Pidgin. Do not use! + * Also, any public API should not depend on this file. + */ + +#if !GLIB_CHECK_VERSION(2, 28, 0) + +static inline void g_list_free_full(GList *list, GDestroyNotify free_func) +{ + GList *it; + it = g_list_first(list); + while (it) + { + free_func(it->data); + it = g_list_next(it); + } + g_list_free(list); +} + +#endif /* 2.28.0 */ + +#endif /* _PIDGINGLIBCOMPAT_H_ */
--- a/libpurple/protocols/gg/avatar.c Tue Sep 04 01:49:58 2012 +0200 +++ b/libpurple/protocols/gg/avatar.c Fri Sep 07 14:03:18 2012 +0200 @@ -30,6 +30,7 @@ #include "avatar.h" #include <debug.h> +#include <glibcompat.h> #include "gg.h" #include "utils.h"
--- a/libpurple/protocols/gg/image.c Tue Sep 04 01:49:58 2012 +0200 +++ b/libpurple/protocols/gg/image.c Fri Sep 07 14:03:18 2012 +0200 @@ -30,6 +30,7 @@ #include "image.h" #include <debug.h> +#include <glibcompat.h> #include "gg.h" #include "utils.h"
--- a/libpurple/protocols/gg/roster.c Tue Sep 04 01:49:58 2012 +0200 +++ b/libpurple/protocols/gg/roster.c Fri Sep 07 14:03:18 2012 +0200 @@ -35,6 +35,7 @@ #include "purplew.h" #include <debug.h> +#include <glibcompat.h> #define GGP_ROSTER_SYNC_SETT "gg-synchronized" #define GGP_ROSTER_DEBUG 0
--- a/libpurple/protocols/gg/servconn.c Tue Sep 04 01:49:58 2012 +0200 +++ b/libpurple/protocols/gg/servconn.c Fri Sep 07 14:03:18 2012 +0200 @@ -32,6 +32,7 @@ #include "utils.h" #include <debug.h> +#include <glibcompat.h> #define GGP_SERVCONN_HISTORY_PREF "/plugins/prpl/gg/server_history" #define GGP_SERVCONN_HISTORY_MAXLEN 15