changeset 16585:6e1c7c34c6af

merge of '86961dfcb9720a0cb020c2baba86c8050b1254f9' and 'e4ec2539cf0008c8eb97a0d8cccebb3f5d7bff33'
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 28 Apr 2007 16:57:03 +0000
parents 3d4579c1dc44 (current diff) dbea1f78b3c9 (diff)
children 513ca15861d7
files libpurple/version.h
diffstat 32 files changed, 183 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Sat Apr 28 16:05:28 2007 +0000
+++ b/configure.ac	Sat Apr 28 16:57:03 2007 +0000
@@ -1,11 +1,50 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([pidgin], [2.0.0beta7devel], [devel@pidgin.im])
+AC_PREREQ([2.50])
+
+# Making releases:
+#   purple_micro_version += 1
+# if any functions have been added:
+#   purple_micro_version = 0
+#   purple_minor_version += 1
+# if backwards compatibility has been broken
+#   purple_minor_version = 0
+#   purple_micro_version = 0
+#   purple_major_version += 1;
+#
+# purple_is_release = 1 *only* for the release
+#
+m4_define([purple_major_version], [2])
+m4_define([purple_minor_version], [0])
+m4_define([purple_micro_version], [0])
+m4_define([purple_version_suffix], [devel])
+m4_define([purple_version],
+          [purple_major_version.purple_minor_version.purple_micro_version])
+dnl m4_define([purple_display_version], purple_version[]m4_if(purple_beta,[7],[beta[]purple_beta]))
+dnl m4_define([purple_display_version], purple_version[]m4_ifdef(purple_suffix[],[purple_suffix]))
+m4_define([purple_display_version], purple_version[]m4_ifdef([purple_version_suffix],[purple_version_suffix]))
+
+AC_INIT([pidgin], [purple_display_version], [devel@pidgin.im])
+
 AC_CANONICAL_SYSTEM
 AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 #AM_INIT_AUTOMAKE([foreign dist-bzip2])
 
-AC_PREREQ([2.50])
+PURPLE_MAJOR_VERSION=purple_major_version
+PURPLE_MINOR_VERSION=purple_minor_version
+PURPLE_MICRO_VERSION=purple_micro_version
+PURPLE_VERSION=[purple_display_version]
+AC_SUBST(PURPLE_MAJOR_VERSION)
+AC_SUBST(PURPLE_MINOR_VERSION)
+AC_SUBST(PURPLE_MICRO_VERSION)
+AC_SUBST(PURPLE_VERSION)
+
+m4_define([lt_current], [m4_eval(100 * purple_major_version + purple_minor_version)])
+m4_define([lt_age], [purple_minor_version])
+m4_define([lt_revision], [purple_micro_version])
+LT_VERSION_INFO="lt_current:lt_revision:lt_age"
+AC_SUBST(LT_VERSION_INFO)
+
 
 AC_DEFINE(PIDGIN_NAME, "Pidgin", [The user-visible application name])
 
@@ -850,10 +889,12 @@
 			"-Waggregate-return" \
 			"-Wcast-align" \
 			"-Wdeclaration-after-statement" \
+			"-Wendif-labels" \
 			"-Werror-implicit-function-declaration" \
 			"-Wextra -Wno-sign-compare -Wno-unused-parameter" \
 			"-Winit-self" \
 			"-Wmissing-declarations" \
+			"-Wmissing-noreturn" \
 			"-Wmissing-prototypes" \
 			"-Wnested-externs" \
 			"-Wpointer-arith" \
@@ -890,7 +931,7 @@
 			}
 		], [
 			AC_MSG_RESULT(yes)
-			DEBUG_CFLAGS="$DEBUG_CFLAGS -D_FORTIFY_SOURCE=2"
+			DEBUG_CFLAGS="$DEBUG_CFLAGS -Wp,-D_FORTIFY_SOURCE=2"
 		], [
 			AC_MSG_RESULT(no)
 		])
@@ -2011,6 +2052,7 @@
 		   libpurple/protocols/yahoo/Makefile
 		   libpurple/protocols/zephyr/Makefile
 		   libpurple/tests/Makefile
+		   libpurple/version.h
 		   finch/Makefile
 		   finch/libgnt/Makefile
 		   finch/libgnt/gnt.pc
--- a/libpurple/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -8,6 +8,7 @@
 		purple-url-handler \
 		purple.pc.in \
 		purple-uninstalled.pc.in \
+		version.h.in \
 		Makefile.mingw \
 		win32/global.mak \
 		win32/libc_interface.c \
@@ -75,6 +76,7 @@
 	upnp.c \
 	util.c \
 	value.c \
+	version.c \
 	xmlnode.c \
 	whiteboard.c
 
@@ -219,7 +221,7 @@
 	$(dbus_headers)
 
 libpurple_la_DEPENDENCIES = $(STATIC_LINK_LIBS)
-libpurple_la_LDFLAGS = -export-dynamic
+libpurple_la_LDFLAGS = -export-dynamic -version-info $(LT_VERSION_INFO) -no-undefined
 libpurple_la_LIBADD = \
 	$(DBUS_LIBS) \
 	$(GLIB_LIBS) \
@@ -232,7 +234,7 @@
 AM_CPPFLAGS = \
 	-DBR_PTHREADS=0 \
 	-DDATADIR=\"$(datadir)\" \
-	-DLIBDIR=\"$(libdir)/purple/\" \
+	-DLIBDIR=\"$(libdir)/purple-$(PURPLE_MAJOR_VERSION)/\" \
 	-DLOCALEDIR=\"$(datadir)/locale\" \
 	-DSYSCONFDIR=\"$(sysconfdir)\" \
 	$(GLIB_CFLAGS) \
--- a/libpurple/example/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/example/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -14,7 +14,7 @@
 	-DSTANDALONE \
 	-DBR_PTHREADS=0 \
 	-DDATADIR=\"$(datadir)\" \
-	-DLIBDIR=\"$(libdir)/libpurple/\" \
+	-DLIBDIR=\"$(libdir)/purple-$(PURPLE_MAJOR_VERSION)/\" \
 	-DLOCALEDIR=\"$(datadir)/locale\" \
 	-DSYSCONFDIR=\"$(sysconfdir)\" \
 	-I$(top_srcdir)/libpurple/ \
--- a/libpurple/plugins/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/plugins/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -22,7 +22,7 @@
 	ssl \
 	$(TCL_DIR)
 
-plugindir = $(libdir)/purple
+plugindir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 autoaccept_la_LDFLAGS       = -module -avoid-version
 buddynote_la_LDFLAGS        = -module -avoid-version
--- a/libpurple/plugins/mono/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/plugins/mono/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -5,7 +5,7 @@
 
 EXTRA_DIST = $(mono_sources)
 
-monodir = $(libdir)/purple
+monodir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 mono_SCRIPTS = MPlugin.dll GetBuddyBack.dll
 mono_build_sources = $(addprefix $(srcdir)/, $(mono_sources))
 
--- a/libpurple/plugins/mono/api/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/plugins/mono/api/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,4 +1,4 @@
-monodir=$(libdir)/purple
+monodir=$(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 mono_sources = \
 	BlistNode.cs \
--- a/libpurple/plugins/mono/loader/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/plugins/mono/loader/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,4 +1,4 @@
-plugindir = $(libdir)/purple
+plugindir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 plugin_LTLIBRARIES = mono.la
 
--- a/libpurple/plugins/perl/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/plugins/perl/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,4 +1,4 @@
-plugindir = $(libdir)/purple
+plugindir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 perl_dirs = common
 
--- a/libpurple/plugins/ssl/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/plugins/ssl/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,7 +1,7 @@
 EXTRA_DIST = \
 		Makefile.mingw
 
-plugindir = $(libdir)/purple
+plugindir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 ssl_la_LDFLAGS        = -module -avoid-version
 ssl_gnutls_la_LDFLAGS = -module -avoid-version
--- a/libpurple/plugins/tcl/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/plugins/tcl/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,4 +1,4 @@
-plugindir = $(libdir)/purple
+plugindir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 tcl_la_LDFLAGS = -module -avoid-version
 
--- a/libpurple/protocols/bonjour/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/bonjour/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,7 +1,7 @@
 EXTRA_DIST = \
 		Makefile.mingw
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 BONJOURSOURCES = \
 	bonjour.c \
--- a/libpurple/protocols/gg/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/gg/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -13,7 +13,7 @@
 	lib/pubdir50.c \
 	lib/pubdir.c
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 if USE_INTERNAL_LIBGADU
 INTGGSOURCES = \
--- a/libpurple/protocols/irc/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/irc/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,6 +1,6 @@
 EXTRA_DIST = PROTOCOL Makefile.mingw
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 IRCSOURCES = irc.c parse.c cmds.c msgs.c irc.h dcc_send.c
 
--- a/libpurple/protocols/jabber/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/jabber/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -3,7 +3,7 @@
 		win32/posix.uname.c \
 		win32/utsname.h
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 JABBERSOURCES = auth.c \
 			  auth.h \
--- a/libpurple/protocols/jabber/Makefile.mingw	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/jabber/Makefile.mingw	Sat Apr 28 16:57:03 2007 +0000
@@ -89,7 +89,7 @@
 
 $(OBJECTS): $(PURPLE_CONFIG_H)
 
-$(TARGET).dll: $(PURPLE_DLL).a $(OBJECTS)
+$(TARGET).dll $(TARGET).dll.a: $(PURPLE_DLL).a $(OBJECTS)
 	$(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--out-implib,$(TARGET).dll.a -o $(TARGET).dll
 
 $(XMPP_TARGET).dll: $(TARGET).dll.a $(XMPP_OBJECTS)
--- a/libpurple/protocols/msn/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/msn/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,7 +1,7 @@
 EXTRA_DIST = \
 		Makefile.mingw
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 MSNSOURCES = \
 	cmdproc.c \
--- a/libpurple/protocols/msn/slp.c	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/msn/slp.c	Sat Apr 28 16:57:03 2007 +0000
@@ -955,7 +955,7 @@
 
 	if (obj == NULL)
 	{
-		purple_buddy_icons_set_for_user(account, user->passport, NULL, 0, NULL);
+/*		purple_buddy_icons_set_for_user(account, user->passport, NULL, 0, NULL); */
 		return;
 	}
 
--- a/libpurple/protocols/novell/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/novell/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,7 +1,7 @@
 EXTRA_DIST = \
 		Makefile.mingw
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 NOVELLSOURCES = \
 		nmfield.h \
--- a/libpurple/protocols/oscar/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/oscar/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -3,7 +3,7 @@
 		AUTHORS \
 		Makefile.mingw
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 OSCARSOURCES = \
 	bstream.c           \
--- a/libpurple/protocols/qq/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/qq/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,7 +1,7 @@
 EXTRA_DIST = \
 		Makefile.mingw
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 QQSOURCES = \
 	buddy_info.c \
--- a/libpurple/protocols/sametime/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/sametime/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -2,7 +2,7 @@
 EXTRA_DIST = Makefile.mingw
 
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 
 noinst_HEADERS = sametime.h
--- a/libpurple/protocols/silc/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/silc/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,6 +1,6 @@
 EXTRA_DIST = README TODO Makefile.mingw
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 SILCSOURCES = silc.c silcpurple.h buddy.c chat.c ft.c ops.c pk.c util.c wb.c wb.h
 
--- a/libpurple/protocols/simple/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/simple/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,7 +1,7 @@
 EXTRA_DIST = \
 		Makefile.mingw
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 SIMPLESOURCES = \
 	simple.c \
--- a/libpurple/protocols/toc/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/toc/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -2,7 +2,7 @@
 		PROTOCOL \
 		Makefile.mingw
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 TOCSOURCES = toc.c
 
--- a/libpurple/protocols/yahoo/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/yahoo/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,7 +1,7 @@
 EXTRA_DIST = \
 		Makefile.mingw
 
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 YAHOOSOURCES = \
 	util.c \
--- a/libpurple/protocols/zephyr/Makefile.am	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/protocols/zephyr/Makefile.am	Sat Apr 28 16:57:03 2007 +0000
@@ -1,4 +1,4 @@
-pkgdir = $(libdir)/purple
+pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
 
 ZEPHYRSOURCES = \
 	ZAsyncLocate.c \
--- a/libpurple/purple.pc.in	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/purple.pc.in	Sat Apr 28 16:57:03 2007 +0000
@@ -11,4 +11,3 @@
 Requires: glib-2.0
 Cflags: -I${includedir}/libpurple
 Libs: -L${libdir} -lpurple
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/version.c	Sat Apr 28 16:57:03 2007 +0000
@@ -0,0 +1,43 @@
+/*
+ * @file version.c Version Functions
+ * @ingroup core
+ *
+ * Purple 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "internal.h"
+
+#include "version.h"
+
+const guint purple_major_version = PURPLE_MAJOR_VERSION;
+const guint purple_minor_version = PURPLE_MINOR_VERSION;
+const guint purple_micro_version = PURPLE_MICRO_VERSION;
+
+const char *purple_version_check(guint required_major, guint required_minor, guint required_micro)
+{
+	if (required_major > PURPLE_MAJOR_VERSION)
+		return "libpurple version too old (major mismatch)";
+	if (required_major < PURPLE_MAJOR_VERSION)
+		return "libpurple version too new (major mismatch)";
+	if (required_minor > PURPLE_MINOR_VERSION)
+		return "libpurple version too old (minor mismatch)";
+	if ((required_minor == PURPLE_MINOR_VERSION) && (required_micro > PURPLE_MICRO_VERSION))
+		return "libpurple version too old (micro mismatch)";
+	return NULL;
+}
--- a/libpurple/version.h	Sat Apr 28 16:05:28 2007 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/**
- * @file version.h Purple Versioning
- *
- * purple
- *
- * Purple 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#ifndef _PURPLE_VERSION_H_
-#define _PURPLE_VERSION_H_
-
-#define PURPLE_MAJOR_VERSION 2
-#define PURPLE_MINOR_VERSION 0
-#define PURPLE_MICRO_VERSION 0
-
-#define PURPLE_VERSION_CHECK(x,y,z) ((x) == PURPLE_MAJOR_VERSION && ((y) < PURPLE_MINOR_VERSION || ((y) == PURPLE_MINOR_VERSION && (z) <= PURPLE_MICRO_VERSION)))
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PURPLE_VERSION_H_ */
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/version.h.in	Sat Apr 28 16:57:03 2007 +0000
@@ -0,0 +1,61 @@
+/**
+ * @file version.h Purple Versioning
+ *
+ * purple
+ *
+ * Purple 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#ifndef _PURPLE_VERSION_H_
+#define _PURPLE_VERSION_H_
+
+#define PURPLE_MAJOR_VERSION (@PURPLE_MAJOR_VERSION@)
+#define PURPLE_MINOR_VERSION (@PURPLE_MINOR_VERSION@)
+#define PURPLE_MICRO_VERSION (@PURPLE_MICRO_VERSION@)
+
+#define PURPLE_VERSION_CHECK(x,y,z) ((x) == PURPLE_MAJOR_VERSION && \
+									 ((y) < PURPLE_MINOR_VERSION || \
+									  ((y) == PURPLE_MINOR_VERSION && (z) <= PURPLE_MICRO_VERSION)))
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+const guint purple_major_version;
+const guint purple_minor_version;
+const guint purple_micro_version;
+
+/**
+ * Checks that the libpurple version is compatible with the requested
+ * version
+ *
+ * @param required_major: the required major version.
+ * @param required_minor: the required minor version.
+ * @param required_micro: the required micro version.
+ *
+ * @return NULL if the versions are compatible, or a string describing
+ *         the version mismatch if not compatible.
+ */
+const char *purple_version_check(guint required_major, guint required_minor, guint required_micro);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _PURPLE_VERSION_H_ */
+
--- a/libpurple/win32/global.mak	Sat Apr 28 16:05:28 2007 +0000
+++ b/libpurple/win32/global.mak	Sat Apr 28 16:57:03 2007 +0000
@@ -57,10 +57,13 @@
 GCCWARNINGS := -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef
 
 # parse the version number from the configure.ac file if it is newer
-#AC_INIT([pidgin], [2.0.0dev], [devel@pidgin.im])
+#m4_define([purple_major_version], [2])
+#m4_define([purple_minor_version], [0])
+#m4_define([purple_micro_version], [0])
+#m4_define([purple_version_suffix], [devel])
 PIDGIN_VERSION := $(shell \
   if [ ! $(PIDGIN_TREE_TOP)/VERSION -nt $(PIDGIN_TREE_TOP)/configure.ac ]; then \
-    awk 'BEGIN {FS="\\] *, *\\["} /^AC_INIT\(.+\)/ {printf("%s",$$2); exit}' \
+    awk 'BEGIN {FS="[\\(\\)\\[\\]]"} /^m4_define..purple_(major|minor)_version/ {printf("%s.",$$5);} /^m4_define..purple_micro_version/ {printf("%s",$$5);} /^m4_define..purple_version_suffix/ {printf("%s",$$5); exit}' \
       $(PIDGIN_TREE_TOP)/configure.ac > $(PIDGIN_TREE_TOP)/VERSION; \
   fi; \
   cat $(PIDGIN_TREE_TOP)/VERSION \
--- a/pidgin.spec.in	Sat Apr 28 16:05:28 2007 +0000
+++ b/pidgin.spec.in	Sat Apr 28 16:57:03 2007 +0000
@@ -350,7 +350,7 @@
 %defattr(-, root, root)
 
 %{_libdir}/libpurple.so.*
-%dir %{_libdir}/purple
+%dir %{_libdir}/purple-2
 %attr(755, root, root) %{perl_vendorarch}/Purple.pm
 %dir %{perl_vendorarch}/auto/Purple
 %attr(755, root, root) %{perl_vendorarch}/auto/Purple/Purple.so