From 63f4e13a3474ed8061f43112c8ac34de722cc020 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Fri, 2 Apr 2010 02:31:38 +0300 Subject: [PATCH] build: don't use _LDFLAGS for -L/-l options _LDFLAGS contents appear before _LIBADD/_LDADD contents on the libtool comand line. Therefore -L/-l options in _LDFLAGS are not in the correct order. Usually this doesn't matter but in OBS openSUSE 11.2 repository the linker option --as-needed is enabled by default. This option demands the correct order of objects, linker libraries and shared libraries in order to resolve all references. Moved all _LDFLAGS contents to _LIBADD/_LDADD. --- src/core/Makefile.am | 3 +-- src/purple/Makefile.am | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 828a1b7a..346a1b19 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -77,8 +77,7 @@ endif check_PROGRAMS = sipe_xml_tests sipe_xml_tests_SOURCES = sipe-xml-tests.c sipe_xml_tests_CFLAGS = $(libsipe_core_la_CFLAGS) -sipe_xml_tests_LDADD = libsipe_core.la -sipe_xml_tests_LDFLAGS = $(LIBXML2_LIBS) $(GLIB_LIBS) +sipe_xml_tests_LDADD = libsipe_core.la $(LIBXML2_LIBS) $(GLIB_LIBS) # disables "caching" of memory blocks in tests TESTS_ENVIRONMENT = G_SLICE="always-malloc" diff --git a/src/purple/Makefile.am b/src/purple/Makefile.am index 539911e4..a0527fbd 100644 --- a/src/purple/Makefile.am +++ b/src/purple/Makefile.am @@ -41,7 +41,7 @@ libsipe_la_LIBADD = \ $(PURPLE_LIBS) if SIP_SEC_KRB5 -libsipe_la_LDFLAGS += $(KRB5_LDFLAGS) +libsipe_la_LIBADD += $(KRB5_LDFLAGS) endif check_PROGRAMS = tests @@ -50,12 +50,12 @@ tests_CFLAGS = $(libsipe_la_CFLAGS) tests_LDADD = \ ../core/libsipe_core_tests.la \ ../core/libsipe_core.la \ - libsipe_backend.la -tests_LDFLAGS = $(PURPLE_LIBS) + libsipe_backend.la \ + $(PURPLE_LIBS) if SIPE_MIME_GMIME -libsipe_la_LIBADD += $(GMIME_LIBS) -tests_LDFLAGS += $(GMIME_LIBS) +libsipe_la_LIBADD += $(GMIME_LIBS) +tests_LDADD += $(GMIME_LIBS) else libsipe_backend_la_SOURCES += purple-mime.c endif -- 2.11.4.GIT