From cdf86550f28fdafba3dea776a0a6bd4ed56f25f0 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Tue, 11 Mar 2008 06:07:08 +0000 Subject: [PATCH] Sigh, GNU LD can be really annoying at times, most linkers will only pull a symbol in from a static library if that symbol is used. (how it should work) However! if you place the library that *uses* those symbols *after* the libraries that have them, then the gnu ld will skip past those symbols, they will never get included and you'll get a linking error.. There are two fixes, tell LD to scan all libraries twice (non-portable?) or just put the libraries in an order that LD can deal with. (annoying!) Originally committed to SVN as r2014. --- aegisub/Makefile.am | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/aegisub/Makefile.am b/aegisub/Makefile.am index cb41c7bc4..6e9893d85 100644 --- a/aegisub/Makefile.am +++ b/aegisub/Makefile.am @@ -61,6 +61,13 @@ aegisub_LDFLAGS += @LIBASS_LIBS@ aegisub_LDADD += libsubtitle_ass.a endif +if HAVE_AUTOMATION +noinst_LIBRARIES += libmisc_automanager.a +libmisc_automanager_a_SOURCES = plugin_manager.cpp +aegisub_LDADD += libmisc_automanager.a +libmisc_automanager_a_CPPFLAGS = @PERL_CFLAGS@ @RUBY_CFLAGS@ @LUA50_CPPFLAGS@ @LUA_CPPFLAGS@ +endif + if HAVE_AUTO4_LUA noinst_LIBRARIES += libauto4_lua.a libauto4_lua_a_SOURCES = auto4_lua.cpp auto4_lua_assfile.cpp auto4_lua_dialog.cpp auto4_lua_scriptreader.cpp @@ -90,13 +97,6 @@ AUTO3_LUA = auto4_auto3.cpp aegisub_LDADD += -L$(srcdir)/../auto3 -laegisub-auto3 endif -if HAVE_AUTOMATION -noinst_LIBRARIES += libmisc_automanager.a -libmisc_automanager_a_SOURCES = plugin_manager.cpp -aegisub_LDADD += libmisc_automanager.a -libmisc_automanager_a_CPPFLAGS = @PERL_CFLAGS@ @RUBY_CFLAGS@ @LUA50_CPPFLAGS@ @LUA_CPPFLAGS@ -endif - if HAVE_HUNSPELL noinst_LIBRARIES += libmisc_hunspell.a libmisc_hunspell_a_SOURCES = spellchecker_hunspell.cpp