Mercurial > pidgin
changeset 13317:41747a38a1a8
[gaim-migrate @ 15686]
SF Patch #1424846 from Matthew Luckie
with changes by me
This builds using a shared library version of libgadu. Wingaim still uses the in-tree copy of libgadu. I hope to get our win32 changes to libgadu merged upstream soon, so we can use the upstream codebase there too.
For libgadu build instructions, see:
http://gaim.sourceforge.net/faq2.php#libgadu
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 22 Feb 2006 02:54:20 +0000 |
parents | 41c4b4aa523a |
children | c87ab056417b |
files | configure.ac src/protocols/gg/Makefile.am src/protocols/gg/buddylist.c src/protocols/gg/confer.c src/protocols/gg/gg.c src/protocols/gg/gg.h src/protocols/gg/search.c src/protocols/gg/search.h |
diffstat | 8 files changed, 87 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Wed Feb 22 02:25:15 2006 +0000 +++ b/configure.ac Wed Feb 22 02:54:20 2006 +0000 @@ -272,6 +272,74 @@ fi +dnl ####################################################################### +dnl # Check for gadugadu client includes and libraries +dnl ####################################################################### +AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [Compile the gadugadu 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 gadugadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"]) +GADU_CFLAGS="" +GADU_LIBS="" +if test -n "$with_gadu_includes" || test -n "$with_gadu_libs"; then + gadu_manual_check="yes" +else + gadu_manual_check="no" +fi +if test "x$gadu_manual_check" = "xno"; then + PKG_CHECK_MODULES(GADU, libgadu, [ + gadu_includes="yes" + gadu_libs="yes" + ], [ + AC_MSG_RESULT(no) + ]) +else + if test "$ac_gadu_includes" != "no"; then + GADU_CFLAGS="-I$ac_gadu_includes" + fi + 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" + fi + GADU_LIBS="$GADU_LIBS -lgadu" + AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS) +fi + +if test "x$gadu_libs" = "xyes"; then + AC_MSG_CHECKING(for libgadu GPL compatibility) + AC_TRY_COMPILE([], [ +#include <libgadu.h> +int main() +{ +#ifdef __GG_LIBGADU_HAVE_OPENSSL +#error "libgadu is not compatible with the GPL when compiled with OpenSSL support." +#endif + return 0; +} + ], [ + AC_MSG_RESULT(yes) + ], [ + AC_MSG_RESULT(no) + echo + echo + echo "libgadu is not compatible with the GPL when compiled with OpenSSL support." + echo "Please recompile libgadu using:" + echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared" + echo "Then rerun this ./configure" + echo + echo + GADU_LIBS="" + GADU_CFLAGS="" + gadu_libs=no + ]) +fi + +AC_SUBST(GADU_LIBS) +AC_SUBST(GADU_CFLAGS) + + AC_ARG_ENABLE(distrib,,,enable_distrib=no) AM_CONDITIONAL(DISTRIB, test "x$enable_distrib" = "xyes") AC_ARG_ENABLE(prpls, [ --disable-prpls don't build dynamic protocol plugins],,enable_prpls=yes) @@ -293,6 +361,9 @@ if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'` fi +if test "x$gadu_libs" != "xyes"; then + STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/gg//'` +fi AC_SUBST(STATIC_PRPLS) STATIC_LINK_LIBS= extern_init= @@ -308,7 +379,7 @@ load_proto="$load_proto gaim_init_${i}_plugin();" case $i in bonjour) static_bonjour=yes ;; - gg) static_gg=yes ;; + gg) static_gg=yes ;; irc) static_irc=yes ;; jabber) static_jabber=yes ;; msn) static_msn=yes ;; @@ -353,6 +424,9 @@ if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'` fi +if test "x$gadu_libs" != "xyes"; then + DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/gg//'` +fi AC_SUBST(DYNAMIC_PRPLS) for i in $DYNAMIC_PRPLS ; do case $i in
--- a/src/protocols/gg/Makefile.am Wed Feb 22 02:25:15 2006 +0000 +++ b/src/protocols/gg/Makefile.am Wed Feb 22 02:54:20 2006 +0000 @@ -3,17 +3,6 @@ pkgdir = $(libdir)/gaim GGSOURCES = \ - lib/common.c \ - lib/dcc.c \ - lib/events.c \ - lib/http.c \ - lib/libgadu.c \ - lib/obsolete.c \ - lib/pubdir.c \ - lib/pubdir50.c \ - lib/compat.h \ - lib/libgadu.h \ - lib/libgadu-config.h \ utils.h \ utils.c \ confer.h \ @@ -31,26 +20,27 @@ if STATIC_GG -st = -DGAIM_STATIC_PRPL +st = -DGAIM_STATIC_PRPL $(GADU_CFLAGS) noinst_LIBRARIES = libgg.a pkg_LTLIBRARIES = libgg_a_SOURCES = $(GGSOURCES) libgg_a_CFLAGS = $(AM_CFLAGS) +libgg_a_LIBADD = $(GADU_LIBS) else -st = +st = $(GADU_CFLAGS) pkg_LTLIBRARIES = libgg.la noinst_LIBRARIES = libgg_la_SOURCES = $(GGSOURCES) +libgg_la_LIBADD = $(GADU_LIBS) endif AM_CPPFLAGS = \ -I$(top_srcdir)/src \ - -I$(top_srcdir)/src/protocols/gg/lib \ - $(DEBUG_CFLAGS) \ - $(GLIB_CFLAGS) + $(GLIB_CFLAGS) \ + $(DEBUG_CFLAGS)
--- a/src/protocols/gg/buddylist.c Wed Feb 22 02:25:15 2006 +0000 +++ b/src/protocols/gg/buddylist.c Wed Feb 22 02:54:20 2006 +0000 @@ -21,7 +21,7 @@ */ -#include "lib/libgadu.h" +#include <libgadu.h> #include "gg.h" #include "utils.h"
--- a/src/protocols/gg/confer.c Wed Feb 22 02:25:15 2006 +0000 +++ b/src/protocols/gg/confer.c Wed Feb 22 02:54:20 2006 +0000 @@ -21,7 +21,7 @@ */ -#include "lib/libgadu.h" +#include <libgadu.h> #include "gg.h" #include "utils.h" #include "confer.h"
--- a/src/protocols/gg/gg.c Wed Feb 22 02:25:15 2006 +0000 +++ b/src/protocols/gg/gg.c Wed Feb 22 02:54:20 2006 +0000 @@ -37,7 +37,7 @@ #include "util.h" #include "request.h" -#include "lib/libgadu.h" +#include <libgadu.h> #include "gg.h" #include "confer.h"
--- a/src/protocols/gg/gg.h Wed Feb 22 02:25:15 2006 +0000 +++ b/src/protocols/gg/gg.h Wed Feb 22 02:54:20 2006 +0000 @@ -24,7 +24,7 @@ #ifndef _GAIM_GG_H #define _GAIM_GG_H -#include "lib/libgadu.h" +#include <libgadu.h> #include "search.h" #include "connection.h"