kocolosk commented on a change in pull request #3932:
URL: https://github.com/apache/couchdb/pull/3932#discussion_r810323107



##########
File path: configure
##########
@@ -29,9 +29,14 @@ ERLANG_MD5="false"
 SKIP_DEPS=0
 
 COUCHDB_USER="$(whoami 2>/dev/null || echo couchdb)"
-SM_VSN=${SM_VSN:-"1.8.5"}
 ARCH="$(uname -m)"
 
+# Try to detect spidermonkey (libmozjs) version automatically
+SM_VSN=${SM_VSN:-$(/sbin/ldconfig -p | sed -n 's/.libmozjs-*\([0-9]*\).*/\1/p' 
| head -n 1)}
+if [ "$SM_VSN" = "185" ]; then
+  SM_VSN="1.8.5"
+fi
+

Review comment:
       We need this to fail gracefully if it can't find SpiderMonkey. Currently 
I'm finding that `./configure` will fail with a line like
   
   > Unsupported SpiderMonkey version: 
   
   which comes from `src/couch/rebar.config.script`. I don't have a specific 
suggestion of where to put the improvement but I think it would be good for the 
system to tell the user that it could not find a SpiderMonkey library  and bail 
a little more clearly




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to