couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject git commit: Fix SpiderMonkey version detection
Date Sat, 21 Jan 2012 22:12:29 GMT
Updated Branches:
  refs/heads/1.2.x 5579fecff -> c43fbc921


Fix SpiderMonkey version detection

Randall's last patch to only test for JSOPTION_ANONFUNFIX ended up
reordering the test before the headers were located. This ran into
errors in version detection. This patch reorders the header location as
well as adds a few more default search paths when no --with-js-include
option is specified to account for newer SpiderMonkeys that puth their
headers into $PREFIX/include/js.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c43fbc92
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c43fbc92
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c43fbc92

Branch: refs/heads/1.2.x
Commit: c43fbc921528d7cbbb4c5b617abdc561f9370aa7
Parents: 5579fec
Author: Paul Joseph Davis <davisp@apache.org>
Authored: Sat Jan 21 16:08:58 2012 -0600
Committer: Paul Joseph Davis <davisp@apache.org>
Committed: Sat Jan 21 16:11:29 2012 -0600

----------------------------------------------------------------------
 configure.ac |   41 ++++++++++++++++++++++-------------------
 1 files changed, 22 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c43fbc92/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index d4de2d1..28da502 100644
--- a/configure.ac
+++ b/configure.ac
@@ -177,8 +177,11 @@ AS_CASE([$(uname -s)],
     [CYGWIN*], [] ,
     [*], [
     CPPFLAGS="$CPPFLAGS -I/opt/local/include"
+    CPPFLAGS="$CPPFLAGS -I/opt/local/include/js"
     CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+    CPPFLAGS="$CPPFLAGS -I/usr/local/include/js"
     CPPFLAGS="$CPPFLAGS -I/usr/include"
+    CPPFLAGS="$CPPFLAGS -I/usr/include/js"
     LDFLAGS="$LDFLAGS -L/opt/local/lib"
     LDFLAGS="$LDFLAGS -L/usr/local/lib"
 ])
@@ -203,6 +206,17 @@ AS_CASE([$(uname -s)],
 
 AM_CONDITIONAL([WINDOWS], [test x$IS_WINDOWS = xTRUE])
 
+AC_CHECK_HEADER([jsapi.h], [], [
+    AC_CHECK_HEADER([js/jsapi.h],
+        [
+        CPPFLAGS="$CPPFLAGS -I$JS_INCLUDE/js"
+        ],
+        [
+            AC_MSG_ERROR([Could not find the jsapi header.
+
+Are the Mozilla SpiderMonkey headers installed?])
+        ])])
+
 OLD_LIBS="$LIBS"
 LIBS="$JS_LIBS $LIBS"
 OLD_CPPFLAGS="$CPPFLAGS"
@@ -247,6 +261,14 @@ AC_CHECK_LIB([$JS_LIB_BASE], [JS_GetStringCharsAndLength],
 
 # Else, hope that 1.7.0 works
 
+# Deal with JSScript -> JSObject -> JSScript switcheroo
+
+AC_CHECK_TYPE([JSScript*],
+    [AC_DEFINE([JSSCRIPT_TYPE], [JSScript*], [Use JSObject* for scripts])],
+    [AC_DEFINE([JSSCRIPT_TYPE], [JSObject*], [Use JSScript* for scripts])],
+    [[#include <jsapi.h>]]
+)
+
 AC_DEFINE([COUCHJS_NAME], ["couchjs"], ["CouchJS executable name."])
 
 if test x${IS_WINDOWS} = xTRUE; then
@@ -298,25 +320,6 @@ fi
 JS_LIBS="-l$JS_LIB_BASE -lm $JS_LIBS"
 AC_SUBST(JS_LIBS)
 
-AC_CHECK_HEADER([jsapi.h], [], [
-    AC_CHECK_HEADER([js/jsapi.h],
-        [
-        CPPFLAGS="$CPPFLAGS -I$JS_INCLUDE/js"
-        ],
-        [
-            AC_MSG_ERROR([Could not find the jsapi header.
-
-Are the Mozilla SpiderMonkey headers installed?])
-        ])])
-
-# Deal with JSScript -> JSObject -> JSScript switcheroo
-
-AC_CHECK_TYPE([JSScript*],
-    [AC_DEFINE([JSSCRIPT_TYPE], [JSScript*], [Use JSObject* for scripts])],
-    [AC_DEFINE([JSSCRIPT_TYPE], [JSObject*], [Use JSScript* for scripts])],
-    [[#include <jsapi.h>]]
-)
-
 LIBS="$OLD_LIBS"
 CPPFLAGS="$OLD_CPPFLAGS"
 


Mime
View raw message