comparison libpurple/protocols/jabber/Makefile.am @ 24332: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 4ac5db6e39f3
children 7183d12b96ed 9ab681f23007 5dd25c58b65e adf153852bcf
comparison
equal deleted inserted replaced
24331:7e8175f9b009 24332:2b62300d2c19
1 EXTRA_DIST = \ 1 EXTRA_DIST = \
2 Makefile.mingw \ 2 Makefile.mingw \
3 win32/posix.uname.c \ 3 win32/posix.uname.c \
4 win32/utsname.h 4 win32/utsname.h
5 5
6 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) 6 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
7 7
8 JABBERSOURCES = auth.c \ 8 JABBERSOURCES = auth.c \
9 auth.h \ 9 auth.h \
57 libxmpp_la_LDFLAGS = -module -avoid-version 57 libxmpp_la_LDFLAGS = -module -avoid-version
58 58
59 if STATIC_JABBER 59 if STATIC_JABBER
60 60
61 st = -DPURPLE_STATIC_PRPL 61 st = -DPURPLE_STATIC_PRPL
62 noinst_LIBRARIES = libjabber.a 62 noinst_LTLIBRARIES = libjabber.la
63 pkg_LTLIBRARIES = 63 libjabber_la_SOURCES = $(JABBERSOURCES) libxmpp.c
64 64 libjabber_la_CFLAGS = $(AM_CFLAGS)
65 libjabber_a_SOURCES = $(JABBERSOURCES) libxmpp.c
66 libjabber_a_CFLAGS = $(AM_CFLAGS)
67 65
68 else 66 else
69 67
70 st = 68 st =
71 pkg_LTLIBRARIES = libjabber.la libxmpp.la 69 pkg_LTLIBRARIES = libjabber.la libxmpp.la
72 noinst_LIBRARIES =
73
74 libjabber_la_SOURCES = $(JABBERSOURCES) 70 libjabber_la_SOURCES = $(JABBERSOURCES)
75 libjabber_la_LIBADD = $(GLIB_LIBS) $(SASL_LIBS) $(LIBXML_LIBS) 71 libjabber_la_LIBADD = $(GLIB_LIBS) $(SASL_LIBS) $(LIBXML_LIBS)
76 72
77 libxmpp_la_SOURCES = libxmpp.c 73 libxmpp_la_SOURCES = libxmpp.c
78 libxmpp_la_LIBADD = libjabber.la 74 libxmpp_la_LIBADD = libjabber.la
79 75
80 endif 76 endif