comparison libpurple/protocols/silc/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 = README TODO Makefile.mingw 1 EXTRA_DIST = \
2 Makefile.mingw \
3 README \
4 TODO
2 5
3 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) 6 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
4 7
5 SILCSOURCES = silc.c silcpurple.h buddy.c chat.c ft.c ops.c pk.c util.c wb.c wb.h 8 SILCSOURCES = \
9 buddy.c \
10 chat.c \
11 ft.c \
12 ops.c \
13 pk.c \
14 silc.c \
15 silcpurple.h \
16 util.c \
17 wb.c \
18 wb.h
6 19
7 AM_CFLAGS = $(st) 20 AM_CFLAGS = $(st)
8 21
9 libsilcpurple_la_LDFLAGS = -module -avoid-version 22 libsilcpurple_la_LDFLAGS = -module -avoid-version
10 23
11 if STATIC_SILC 24 if STATIC_SILC
12 25
13 st = -DPURPLE_STATIC_PRPL $(SILC_CFLAGS) 26 st = -DPURPLE_STATIC_PRPL $(SILC_CFLAGS)
14 noinst_LIBRARIES = libsilcpurple.a 27 noinst_LTLIBRARIES = libsilcpurple.la
15 pkg_LTLIBRARIES = 28 libsilcpurple_la_SOURCES = $(SILCSOURCES)
16 29 libsilcpurple_la_CFLAGS = $(AM_CFLAGS)
17 libsilcpurple_a_SOURCES = $(SILCSOURCES) 30 libsilcpurple_la_LIBADD = $(SILC_LIBS)
18 libsilcpurple_a_CFLAGS = $(AM_CFLAGS)
19 libsilcpurple_a_LIBADD = $(SILC_LIBS)
20 31
21 else 32 else
22 33
23 st = $(SILC_CFLAGS) 34 st = $(SILC_CFLAGS)
24 pkg_LTLIBRARIES = libsilcpurple.la 35 pkg_LTLIBRARIES = libsilcpurple.la
25 noinst_LIBRARIES =
26
27 libsilcpurple_la_SOURCES = $(SILCSOURCES) 36 libsilcpurple_la_SOURCES = $(SILCSOURCES)
28 libsilcpurple_la_LIBADD = $(GLIB_LIBS) $(SILC_LIBS) 37 libsilcpurple_la_LIBADD = $(GLIB_LIBS) $(SILC_LIBS)
29 38
30 endif 39 endif
31 40
32 AM_CPPFLAGS = \ 41 AM_CPPFLAGS = \
33 -I$(top_srcdir)/libpurple \ 42 -I$(top_srcdir)/libpurple \
34 -I$(top_builddir)/libpurple \ 43 -I$(top_builddir)/libpurple \
44 $(DEBUG_CFLAGS) \
35 $(GLIB_CFLAGS) \ 45 $(GLIB_CFLAGS) \
36 $(DEBUG_CFLAGS) 46 $(SILC_CFLAGS)