couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r811910 - in /couchdb/trunk: configure.ac src/couchdb/Makefile.am
Date Sun, 06 Sep 2009 21:55:49 GMT
Author: davisp
Date: Sun Sep  6 21:55:49 2009
New Revision: 811910

URL: http://svn.apache.org/viewvc?rev=811910&view=rev
Log:
Fix for building CouchDB on Snow Leapord.

I was unable to track down the root cause of this bug, but for some reason, having -ljs in
the link command for couch_erl_driver was causing a segfault when loading the latter in Erlang.

This patch just removes -ljs from the global LIBS variable and places it specificially in
the libs for couchjs.


Modified:
    couchdb/trunk/configure.ac
    couchdb/trunk/src/couchdb/Makefile.am

Modified: couchdb/trunk/configure.ac
URL: http://svn.apache.org/viewvc/couchdb/trunk/configure.ac?rev=811910&r1=811909&r2=811910&view=diff
==============================================================================
--- couchdb/trunk/configure.ac (original)
+++ couchdb/trunk/configure.ac Sun Sep  6 21:55:49 2009
@@ -103,10 +103,10 @@
 
 AM_CONDITIONAL([WINDOWS], [test x$IS_WINDOWS = xTRUE])
 
-AC_CHECK_LIB([mozjs], [JS_NewContext], [], [
-    AC_CHECK_LIB([js], [JS_NewContext], [], [
-        AC_CHECK_LIB([js3250], [JS_NewContext], [], [
-            AC_CHECK_LIB([js32], [JS_NewContext], [], [
+AC_CHECK_LIB([mozjs], [JS_NewContext], [JSLIB=-lmozjs], [
+    AC_CHECK_LIB([js], [JS_NewContext], [JSLIB=-ljs], [
+        AC_CHECK_LIB([js3250], [JS_NewContext], [JSLIB=-ljs3250], [
+            AC_CHECK_LIB([js32], [JS_NewContext], [JSLIB=-ljs32], [
                 AC_MSG_ERROR([Could not find the js library.
 
 Is the Mozilla SpiderMonkey library installed?])])])])])
@@ -122,6 +122,8 @@
 Are the Mozilla SpiderMonkey headers installed?])
         ])])
 
+AC_SUBST(JSLIB)
+
 AC_LANG_PUSH(C)
 OLD_CFLAGS="$CFLAGS"
 CFLAGS="-Werror-implicit-function-declaration"

Modified: couchdb/trunk/src/couchdb/Makefile.am
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/Makefile.am?rev=811910&r1=811909&r2=811910&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/Makefile.am (original)
+++ couchdb/trunk/src/couchdb/Makefile.am Sun Sep  6 21:55:49 2009
@@ -36,7 +36,7 @@
 couchjs_SOURCES = couch_js.c curlhelper.c curlhelper.h
 couchjs_LDFLAGS = $(CURL_LDFLAGS)
 couchjs_CFLAGS = $(CURL_CFLAGS)
-couchjs_LDADD = $(CURL_LDFLAGS)
+couchjs_LDADD = $(CURL_LDFLAGS) @JSLIB@
 
 if WINDOWS
 couch_erl_driver_la_LDFLAGS += -no-undefined



Mime
View raw message