comparison libpurple/protocols/simple/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 441945083737
children adf153852bcf
comparison
equal deleted inserted replaced
24388:7e8175f9b009 24389:2b62300d2c19
1 EXTRA_DIST = \ 1 EXTRA_DIST = \
2 Makefile.mingw 2 Makefile.mingw
3 3
4 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) 4 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
5 5
6 SIMPLESOURCES = \ 6 SIMPLESOURCES = \
7 simple.c \ 7 simple.c \
8 simple.h \ 8 simple.h \
9 sipmsg.c \ 9 sipmsg.c \
10 sipmsg.h 10 sipmsg.h
11 11
12 AM_CFLAGS = $(st) 12 AM_CFLAGS = $(st)
13 13
14 libsimple_la_LDFLAGS = -module -avoid-version 14 libsimple_la_LDFLAGS = -module -avoid-version
15 15
16 if STATIC_MSN 16 if STATIC_MSN
17 17
18 st = -DPURPLE_STATIC_PRPL 18 st = -DPURPLE_STATIC_PRPL
19 noinst_LIBRARIES = libsimple.a 19 noinst_LTLIBRARIES = libsimple.la
20 libsimple_a_SOURCES = $(SIMPLESOURCES) 20 libsimple_la_SOURCES = $(SIMPLESOURCES)
21 libsimple_a_CFLAGS = $(AM_CFLAGS) 21 libsimple_la_CFLAGS = $(AM_CFLAGS)
22 22
23 else 23 else
24 24
25 st = 25 st =
26 pkg_LTLIBRARIES = libsimple.la 26 pkg_LTLIBRARIES = libsimple.la
27 libsimple_la_SOURCES = $(SIMPLESOURCES) 27 libsimple_la_SOURCES = $(SIMPLESOURCES)
28 libsimple_la_LIBADD = $(GLIB_LIBS) 28 libsimple_la_LIBADD = $(GLIB_LIBS)
29 29
30 endif 30 endif
31 31