comparison libpurple/protocols/irc/Makefile.am @ 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 342107309cf3
children adf153852bcf
comparison
equal deleted inserted replaced
24388:7e8175f9b009 24389:2b62300d2c19
1 EXTRA_DIST = Makefile.mingw 1 EXTRA_DIST = \
2 Makefile.mingw
2 3
3 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) 4 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
4 5
5 IRCSOURCES = irc.c parse.c cmds.c msgs.c irc.h dcc_send.c 6 IRCSOURCES = \
7 cmds.c \
8 dcc_send.c \
9 irc.c \
10 irc.h \
11 msgs.c \
12 parse.c
6 13
7 AM_CFLAGS = $(st) 14 AM_CFLAGS = $(st)
8 15
9 libirc_la_LDFLAGS = -module -avoid-version 16 libirc_la_LDFLAGS = -module -avoid-version
10 17
11 if STATIC_IRC 18 if STATIC_IRC
12 19
13 st = -DPURPLE_STATIC_PRPL 20 st = -DPURPLE_STATIC_PRPL
14 noinst_LIBRARIES = libirc.a 21 noinst_LTLIBRARIES = libirc.la
15 pkg_LTLIBRARIES = 22 libirc_la_SOURCES = $(IRCSOURCES)
16 23 libirc_la_CFLAGS = $(AM_CFLAGS)
17 libirc_a_SOURCES = $(IRCSOURCES)
18 libirc_a_CFLAGS = $(AM_CFLAGS)
19 24
20 else 25 else
21 26
22 st = 27 st =
23 pkg_LTLIBRARIES = libirc.la 28 pkg_LTLIBRARIES = libirc.la
24 noinst_LIBRARIES =
25
26 libirc_la_SOURCES = $(IRCSOURCES) 29 libirc_la_SOURCES = $(IRCSOURCES)
27 libirc_la_LIBADD = $(GLIB_LIBS) 30 libirc_la_LIBADD = $(GLIB_LIBS)
28 31
29 endif 32 endif
30 33