Mercurial > pidgin
view libpurple/plugins/perl/common/Connection.xs @ 24389:2b62300d2c19
Use libtool to build static archives when --with-static-prpls is passed
to configure. Does anyone know why we weren't using libtool before? We
were building old-fashioned .a files. But libtool archives (.la) can
contain either static or shared libraries.
I found it a lot easier to get static prpl compilation working after
making this change (that is to say, it worked). Without this I got this
error, which is probably fixable, but consistently using libtool seems
like it makes things easier:
*** Warning: Linking the shared library libpurple.la against the
*** static library ../libpurple/protocols/msn/libmsn.a is not portable!
/usr/bin/ld: ../libpurple/protocols/msn/libmsn.a(libmsn_a-msn.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
../libpurple/protocols/msn/libmsn.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Wed, 12 Nov 2008 11:30:51 +0000 |
| parents | e3f30a73a793 |
| children | 27b3ad94e1e3 |
line wrap: on
line source
#include "module.h" MODULE = Purple::Connection PACKAGE = Purple::Connection PREFIX = purple_connection_ PROTOTYPES: ENABLE BOOT: { HV *stash = gv_stashpv("Purple::Connection::State", 1); static const constiv *civ, const_iv[] = { #define const_iv(name) {#name, (IV)PURPLE_##name} const_iv(DISCONNECTED), const_iv(CONNECTED), const_iv(CONNECTING), }; for (civ = const_iv + sizeof(const_iv) / sizeof(const_iv[0]); civ-- > const_iv; ) newCONSTSUB(stash, (char *)civ->name, newSViv(civ->iv)); } Purple::Account purple_connection_get_account(gc) Purple::Connection gc const char * purple_connection_get_password(gc) Purple::Connection gc const char * purple_connection_get_display_name(gc) Purple::Connection gc void purple_connection_notice(gc, text) Purple::Connection gc const char *text void purple_connection_error(gc, reason) Purple::Connection gc const char *reason void purple_connection_destroy(gc) Purple::Connection gc void purple_connection_set_state(gc, state) Purple::Connection gc Purple::ConnectionState state void purple_connection_set_account(gc, account) Purple::Connection gc Purple::Account account void purple_connection_set_display_name(gc, name) Purple::Connection gc const char *name Purple::ConnectionState purple_connection_get_state(gc) Purple::Connection gc MODULE = Purple::Connection PACKAGE = Purple::Connections PREFIX = purple_connections_ PROTOTYPES: ENABLE void purple_connections_disconnect_all() void purple_connections_get_all() PREINIT: GList *l; PPCODE: for (l = purple_connections_get_all(); l != NULL; l = l->next) { XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Connection"))); } void purple_connections_get_connecting() PREINIT: GList *l; PPCODE: for (l = purple_connections_get_connecting(); l != NULL; l = l->next) { XPUSHs(sv_2mortal(purple_perl_bless_object(l->data, "Purple::Connection"))); } Purple::Handle purple_connections_get_handle()
