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:16:14 GMT
Updated Branches:
  refs/heads/1.1.x 09ce0771b -> 5e503bb34


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/5e503bb3
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5e503bb3
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5e503bb3

Branch: refs/heads/1.1.x
Commit: 5e503bb34cb35816ef08091f3fa4d8aee8bb97e5
Parents: 09ce077
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:15:31 2012 -0600

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


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5e503bb3/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index ca51f93..0c70588 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,6 +115,17 @@ esac
 
 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"
@@ -159,6 +170,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
@@ -210,25 +229,6 @@ fi
 JSLIB=-l$JS_LIB_BASE
 AC_SUBST(JSLIB)
 
-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