From 3edb841959f2f3abb019dd2cf23da0bb3b648f71 Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Tue, 3 Aug 2010 13:18:00 +0200 Subject: [PATCH] Fix mod_spidermonkey build on FreeBSD, (Undefined symbol PR_LocalTimeParameters). Move nspr libs to AM_LIBADD to make sure they are _after_ libjs.so.1, so missing PR_* symbols in libjs can be resolved. Having all those nspr libs in AM_LDFLAGS will make them to end up before libjs on the final linker commandline. The wrong order caused the build-time linker to discard nspr, since nothing had unresolved symbols belonging to it at that point. (mod_spidermonkey does not use any PR_* functions/objects.) Compile + load tested on FreeBSD-8.1. --- src/mod/languages/mod_spidermonkey/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mod/languages/mod_spidermonkey/Makefile.am b/src/mod/languages/mod_spidermonkey/Makefile.am index 7ec68928a5..34178bda08 100644 --- a/src/mod/languages/mod_spidermonkey/Makefile.am +++ b/src/mod/languages/mod_spidermonkey/Makefile.am @@ -12,9 +12,9 @@ JSLA=$(JS_BUILDDIR)/libjs.la AM_CFLAGS += -I. -I$(JS_DIR)/src -I$(JS_DIR)/nsprpub/dist/include/nspr AM_CFLAGS += -DXP_UNIX -DJS_THREADSAFE -DJS_HAS_FILE_OBJECT=1 -DJS_HAS_XML_SUPPORT=1 -AM_LIBADD = $(switch_builddir)/libfreeswitch.la $(JSLA) +AM_LIBADD = $(switch_builddir)/libfreeswitch.la $(JSLA) -lnspr4 $(JS_BUILDDIR)/nsprpub/pr/src/libnspr4.* AM_LDFLAGS += -avoid-version -module -no-undefined -shared -AM_LDFLAGS += -L$(JS_BUILDDIR)/nsprpub/dist/lib -lnspr4 $(JS_BUILDDIR)/nsprpub/pr/src/libnspr4.* +AM_LDFLAGS += -L$(JS_BUILDDIR)/nsprpub/dist/lib BUILT_SOURCES = $(JSLA) $(LIBCURL_DEPS) mod_LTLIBRARIES = mod_spidermonkey.la