comparison libpurple/protocols/sametime/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 441945083737
children c72b77a638a1 adf153852bcf
comparison
equal deleted inserted replaced
24331:7e8175f9b009 24332:2b62300d2c19
1 1 EXTRA_DIST = \
2 EXTRA_DIST = Makefile.mingw 2 Makefile.mingw
3
4 3
5 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION) 4 pkgdir = $(libdir)/purple-$(PURPLE_MAJOR_VERSION)
6
7 5
8 noinst_HEADERS = sametime.h 6 noinst_HEADERS = sametime.h
9 7
10 SAMETIMESOURCES = sametime.c 8 SAMETIMESOURCES = sametime.c
11 9
10 AM_CFLAGS = \
11 $(st) \
12 -DG_LOG_DOMAIN=\"sametime\"
12 13
13 if STATIC_SAMETIME 14 if STATIC_SAMETIME
14 15
15 st = -DPURPLE_STATIC_PRPL 16 st = -DPURPLE_STATIC_PRPL
16 noinst_LIBRARIES = libsametime.a 17 noinst_LTLIBRARIES = libsametime.la
17 libsametime_a_SOURCES = $(SAMETIMESOURCES) 18 libsametime_la_SOURCES = $(SAMETIMESOURCES)
18 libsametime_a_CFLAGS = $(AM_CFLAGS) 19 libsametime_la_CFLAGS = $(AM_CFLAGS)
19 20
20 else 21 else
21 22
22 st = 23 st =
23 pkg_LTLIBRARIES = libsametime.la 24 pkg_LTLIBRARIES = libsametime.la
24 libsametime_la_SOURCES = $(SAMETIMESOURCES) 25 libsametime_la_SOURCES = $(SAMETIMESOURCES)
25 26
26
27 endif 27 endif
28
29 28
30 libsametime_la_LDFLAGS = -module -avoid-version 29 libsametime_la_LDFLAGS = -module -avoid-version
31 libsametime_la_LIBADD = $(GLIB_LIBS) $(MEANWHILE_LIBS) 30 libsametime_la_LIBADD = $(GLIB_LIBS) $(MEANWHILE_LIBS)
32 31
32 AM_CPPFLAGS = \
33 -I$(top_srcdir)/libpurple \
34 -I$(top_builddir)/libpurple \
35 $(DEBUG_CFLAGS) \
36 $(GLIB_CFLAGS) \
37 $(MEANWHILE_CFLAGS)
33 38
34 AM_CFLAGS = \
35 $(GLIB_CFLAGS) $(MEANWHILE_CFLAGS) \
36 $(DEBUG_CFLAGS) \
37 -I$(top_srcdir)/libpurple \
38 -I$(top_builddir)/libpurple
39
40
41 AM_CPPFLAGS = \
42 -DG_LOG_DOMAIN=\"sametime\" \
43 $(st)
44